Lesson 2 of 18

Getting Around FinalBuilder (Demo)

Duration: 15:02 Watch on YouTube (external link, opens in new tab)

Markdown version

In this lesson

Roy Osherove tours the FinalBuilder (external link, opens in new tab) IDE: the main and on failure tabs of a project, the action categories on the left, from .NET tools, Amazon EC2 and databases to file sets, flow control, GUI automation, interactive questions, iterators and XML, and the search for actions such as running a DOS command or a PowerShell script. He creates a first one-action project that runs echo hello world, fixes the error it reports, and shows the build log, the editable action descriptions that keep scripts readable, a break point with the watch window, and the FinalBuilder Action Studio, which creates packages of actions.

Transcript

2,399 words

[00:01] (external link, opens in new tab) Okay, so let's take a look at the FinalBuilder (external link, opens in new tab) IDE. When you first open it, the FinalBuilder IDE, what you see is in the main UI is divided into three main parts. Let's actually the the main part here is basic actions. We don't have anything open. So, I'm going to actually create a new project here. And what we have in the new project is now in the middle. We have these tabs in the top. That's the welcome page. We can close that. This is the actual project page that we're working on. Now, there's a top tab and then there are bottom tabs.

[00:33] (external link, opens in new tab) The bottom tabs are basically kind of like functions. There's a main function and all the actions we're going to pick from the action pane on the left will come in here. Then there's an onfailure action or function. And here we can put any special functions in case of script failure. But the we there's much more in ways of handling errors except this something so simplistic but for now this will do for very simple scripts.

[01:06] (external link, opens in new tab) Now we could later on and we will show how to create extra functions more more tabs here that even accept parameters so we can reuse stuff. So don't worry about the fact that we might end up with very big monotonous scripts that are unmaintainable because we will make them maintainable along the way. So that's the middle part here and the left part is the actions tab. Now on top of that the on top of that actions tabs all the folders here are just all the categories

[01:39] (external link, opens in new tab) Of the different actions that FinalBuilder has built in and just the list of categories of all the actions tells you that there's quite a bit out there. And I found nothing similar in terms of how mature this tool is in terms of amount of actions for specific categories. So as I as I click a specific category let's say net tools here in the bottom all the specific actions that are related to that category are presented.

[02:12] (external link, opens in new tab) So for example if I wanted to generate a key pair I wanted to install a key file or run fx cop or do engines or install things in the global assembly cache. If you're not a .NET developer, this shouldn't mean a lot to you. But let's look at something for example let's say COM+. If you're an IT person and you have COM+ installed, you can install COM+ applications. If you're working with Amazon EC2, there's a category for working with Amazon.

[02:44] (external link, opens in new tab) I don't think they have an Azure yet or I think they might be working on it in the latest versions. But Amazon EC2 supports a lot of automation out of the gate. So you can run instances and kill them. In terms of other virtual machines, you also have VMware HyperV virtual machines stopping and stop starting and stopping. We'll cover a lot of these in depth. But just the sheer amount of categories it will be anything from

[03:19] (external link, opens in new tab) Zipping like like archivers to compiling and burning DVDs working with specific source control issues whole bunch of compilers this was originally built in Delphi as far as I know Continua CI is from the makers of FinalBuilder it's a new tool that they're working on for it's kind of like a competitor to TeamCity or to TFS build. And here there's a bunch of examples working with specific databases.

[03:50] (external link, opens in new tab) If you're a database person or you need to do some database actions, you can do a lot to automate stuff just from the actions here. If I click an action for example here, let's say back up a specific database. I click this. What I get, you'll notice, is a nice easy to use dialogue that allows me to view list of servers or even use special variables that we haven't used here yet. I can set which database instance to back up, any security related, of course, that's encrypted.

[04:26] (external link, opens in new tab) Maintenance options, specific database names and reporting, what specific backup details I want to do. A lot of these actions are very well thought out, so you won't have to reinvent the wheel. Disk management, mapping disk drives. There's stuff here that I've never personally used. There's a interesting thing called file sets here, which we'll look into later. When you're working with multiple files and directories, file sets and files and directories categories allow you to do a lot of things with files

[05:00] (external link, opens in new tab) That usually do either manually or you have to do painstakingly somewhat automatically. So imagine looping over all the files and only the ones that specifically answer a specific not just a pattern but they have specific content in them. You want to change that content. You want to merge it into something. You can also run multiple FinalBuilder projects from within a single FinalBuilder script. There's a FinalBuilder server that's an older product from the same company called VSoft which made FinalBuilder to have a central solution just to run FinalBuilder files.

[05:36] (external link, opens in new tab) I think it's a pretty cool idea because you do want the files that you create with FinalBuilder scripts to be executed from a central location and orchestrate all that stuff. We're not going to cover it for now, but maybe later in the course. Flow control is something we're going to cover. You can basically have very complicated flow control here. You want to minimize it as much as possible though, but you can have that stuff here. Interesting things here are GUI automation. If you're a tester, this might help you a lot.

[06:09] (external link, opens in new tab) If you have a lot of stuff that developers gave you that does not have an API that you can invoke, you can do a lot of UI automation. Although I have to remind you this can create some unmaintainable crap that you later have to keep changing. So whenever you can try not to do a lot of UI stuff. In many companies that I've worked in we had to generate help documentation. There's some support for basic help documentation here. It pretty much was working very nicely for us.

[06:39] (external link, opens in new tab) If you have to set up IIS working within credit build if you have to create your own installers interactive is special category that allows you to create the scripts and FinalBuilder that ask you questions and then they can put those questions in variables and use those variables. This is good if you have a process and that process is semi-automatic in that it has to have some input in that for example are you sure that you want to do deploy to production or which environment do you want to deploy to or anything you can have multi questions input boxes a lot of interesting things

[07:18] (external link, opens in new tab) Internet allows you to download stuff directly from the internet or upload using FTPs or anything a lot of iterators iterate over files, folders, and for each one of them, you can do custom stuff. Licensing, if you have licensing tools, you can run them directly from here. Of course, all these things, they do have command line options that if you read read through their documentation, you can do that. But those are just built into these. So, you don't have to reinvent the wheel and keep learning how to do all that stuff. You can trust FinalBuilder to execute it.

[07:50] (external link, opens in new tab) And worst case, you can always, of course, execute it. For example, MS deploy miscellaneous. A lot of times I would have to find and replace things inside a text file. Let's see. Check if host exists, run NuGet packages, generate pdfs, run obfuscators. And you see I think we've just about maybe threequarters of the way in. There's still a lot of stuff here.

[08:21] (external link, opens in new tab) If you if you know what Sysinternals is, this has support for the Sysinternals tools on the local machine and will just run them. Secure FTP source control tools sshing into various machines working you can even create stacks and cues directly here. So it's kind of like visual programming in many ways. Task scheduling that you can add schedule task and manage them. testing tools, a lot of testing tools that you can just execute directly from FinalBuilder.

[08:54] (external link, opens in new tab) And in this case, FinalBuilder can be the single orchestrator of a very complicated piece of logic of when to run things. VMware stuff waiting sometimes waiting is something we have to do with complicated things. A lot of times automation in especially in enterprise software is just a horrible large piece of something with string and gum and you know tax and whatever whatever you can do to move things from one side of the organization to the other. Sometimes you have to wait for something to happen.

[09:26] (external link, opens in new tab) You have to wait for an FTP folder to be full. You have to wait for a folder to be somewhere. You have to wait for a host to exist. you have to wait sometimes and that stuff is manual and we can automate that stuff with this with this Windows operating system kill processes that you need to before you start this is also helpful XML so you can merge XML you can change XML nodes a lot of different stuff here so if if I want to merge through XML files I can say which files there are where they're located etc

[09:58] (external link, opens in new tab) Now at the bottom so hold on still on the left. If I wanted to search for a specific something, I can just say search let's say DOS command. So I can run a specific DOS command here or a batch file or I can say is there anything with PowerShell and of course there's execute PowerShell script or run pings or whatever I want to do. So I want to say ping something. I can probably either create my own stuff and even has examples. And then you see the word script here.

[10:30] (external link, opens in new tab) We'll talk about scripts in a second, but that's the one tab in the actions tabs on the left here. That's the structure of the project that we have. And the structure will show the information about the project, any actions list that we have, any custom scripts that we can write either in JavaScript or Python or PowerShell or VBScript, god forbid, and any variables. And we'll talk a lot about variables later on in the course. And then you have properties for a specific action.

[11:00] (external link, opens in new tab) For example, if I go to actions and I say give me a specific action like run NUnit. If I click on the properties here, I can see all the actions here as if I'm double clicking here. And lastly, there is the run. This gives me the status of the run. If I try to run something, I'm going to first I'm going to get here. Oh, I didn't set any NUnit options in the FinalBuilder global configuration.

[11:31] (external link, opens in new tab) It doesn't know where the NUnit executable is. But if I do, I see a run status here. Now, at the bottom, we start seeing that we have validation messages. We have quick help, which for me wasn't very helpful so far. We have the build log if we have builds running. Let's actually create a very simple build just so we can see what that looks like. I'm going to go to actions. I'm going to say run a command line and the command is echo hello

[12:03] (external link, opens in new tab) World. If I run this first it asks to save this project. I'm going to save this project here and if I say demo one and now you see that person was running very quickly and immediately I get this oh output oh echo is not recognized as an internal or external command. So I got an error here and I see the error here and I can double click this and I can say okay I meant to say echo like this.

[12:36] (external link, opens in new tab) If I run it now, should be able to see the person running. The person was running here. That's weird that it's running, but I guess it's a visualization of something. This here, I see the the output window. It's hierarchical. And I can look for different things. I can search for things here. I can see all the outputs from everything. I can see build statistics for running this specific script on the local machine. The build history for this project. Any watches? The watches are good if you want to debug something.

[13:09] (external link, opens in new tab) I'll talk about debugging. Also the description of this is very important because one of the reason I say this can be readable and maintainable is because by default it will show in the description some of the stuff from the properties of the current action. But if I want to, I can just edit this and say do something to say hello.

[13:40] (external link, opens in new tab) Now, it doesn't change the actual properties of the function of of the action, sorry, but I can make things much more readable. So if I delete this, it goes back to just describing the function in a pretty good way. So here here I have all the bottom parts to see the statuses. If I put a break point here just by clicking I can actually run this and now I'm actually in break mode in that I'm debugging something. And here I have my watch window and I'll show more about debugging later on.

[14:14] (external link, opens in new tab) So I can just continue. So and that's for me it's a very nice thing. If you have complicated scripts it's easy to debug them. Although if you have to debug them, maybe they're too complicated and you need to simplify your scripts. So that's a standard overview of what FinalBuilder at the beginning can do. If actually one thing we can show is the FinalBuilder action studio which if we run it you can actually create a new package here and that package can have all the options of what to do and all the actions in the package.

[14:51] (external link, opens in new tab) So I can create an I can add more actions here and I think we'll we'll make that into a separate video later on in the course.