Hello, my name is Gregory Liss. I'm the development manager for Toad DevOps Toolkit and today we're going to do a demonstration on how to get Toad DevOps Toolkit operating under Jenkins. Now the first piece of information you need to understand is that Toad DevOps Toolkit is a Windows automation server, or com. And the easiest way to get com operating in this environment is through PowerShell, and Jenkins comes directly with PowerShell available. So that is the mechanism we're going to use.
Now when you open up your Jenkins, you want to create a new project and we'll call it TDT. And it will be a freestyle project. And if you're familiar with Jenkins, what you'll see when it's created is your basic Jenkins interface where you have the project name, description, the ability to do source control management, various build triggers, set up your build environment. But the part we're concerned about is we're going to add a build step.
Now I'm going to create a Windows PowerShell build step. And in the interest of time, I'm going to paste in the instantiation of Toad DevOps Toolkit. And this is a very standard mechanism, you would do the same thing if you were creating a com instance of Excel or a com instance of Word, or even a com instance of Oracle. You create a variable, I called it TDT. I create a new object, it's a com object, and this is the name of the object.
I'm going to call a piece of TDT one of the APIs and it's called licensing. And this will tell me the licensing information for TDT, and all of these API calls are documented in the help. And then once I'm done, I'm going to quit. Again, another com or another API call that is defined in the API documentation.
We will save this and now I can build this project. And you'll see it's going along. And once it's completed, we can go look at the console output and the information from TDT will appear there. So I created it, it shows me my API key, it shows me the number of days remaining on my license, expiration date, the license number, the quantity, and then I successfully complete it.
Now that is the basics on how to create a Jenkins instance of TDT, but unfortunately it doesn't do much. So let's take a look at something a little more substantial using the same kind of ideas, the same process. And we'll integrate Toad Oracle with it as well.
Now you can see that I'm in Toad for Oracle. I've got a team coding manage project with some items in it. And I'm going to modify this item, add some numbers to it, 925 because I like that number. And I will check out the item. And now it will check it in. Just new information from my comment because I can't think of anything else.
Now one of the features or properties of Git is I've committed this to the system, but I haven't pushed it. So I have created a little external tool to do my Git push. Now I'm pushing the information into Git so that I actually have a change in the system. And once that completes, we'll go to our Jenkins instance and see if we can do something with it.
So now I've created this longer project in my demo. And if we go to configure the project, you can see [? vis ?] the first demo there is a little bit more information. I've connected to a GitHub project, which is the same project my Toad instance was connected to.
So I've got my Git repository. I'm creating it into a local subdirectory called source when I check everything out. I don't have any build triggers set up, but you could easily set up a build trigger so that when I check in anything into source control, when I check in anything into Git and commit those changes and push them in, then this will automatically trigger.
I'm cleaning up my workspace before everything starts. I like to have timestamps in my console output. And I like to have some secret text, mainly because I don't want to have my Oracle usernames and passwords out in the open space. So I've created an Oracle user and an Oracle password so it's very, very secret encrypted, so nobody can see it easily.
Now this script compared to the previous version is a little more complex. I still create my instance, but now I'm setting up some environment variables to look in my source and my output. I create a connection string using my Oracle username and Oracle password, and I write it out just in case. I want to make sure that it's very secret, so I want to make sure that it's writing stars.
Now I go through and if I've created a viable instance of Toad DevOps Toolkit, then I want to check my connections. I want to go create a new connection from my code analysis. I want to set code analysis to my report name. I want to include HTML and JSON. I'm going to use the default rule set, set my output folder, and I want to walk through my source and look for any functions because today all I'm worried about is analyzing functions. I'm adding the files and then I'm going to execute code analysis on those files.
I've added some debug items so that just in case I want to, I can get debug information out of Toad DevOps Toolkit. And once I'm done with that, I want to copy those artifacts and make sure I have a copy of them. And I want to push those artifacts into my Jenkins build so that anybody pulling up my Jenkins webpage can see those results.
And then I also wrote a little PowerShell script and this