Lesson 16 of 18
Custom Action Scripts in Powershell & Javascript
In this lesson
Roy Osherove shows a relatively unknown feature of FinalBuilder (external link, opens in new tab): every action has a script editor, where scripts in JavaScript, PowerShell, Python or VBScript run while the action executes and can use objects such as the action itself. He used it to change the TeamCity status on each action he cared about, by sending log messages in a specific format, but notes that it is usually not recommended because these scripts are relatively hidden.
Transcript
[00:02] (external link, opens in new tab) One of the relatively unknown features in FinalBuilder is that you can script all actions to and gain even more control during runtime. Now, this is usually not recommended because these things are relatively hidden, but you can do very interesting things. For example, I wanted the TeamCity status to change on on every specific action that I care about. And to do that, I have to send out stuff to the log file in a specific format. And there was no easy way to do it just with the built-in actions.
[00:33] (external link, opens in new tab) So for each action just like you have build log next to it you have a script editor. So for an action I can change I can actually create scripts for that specific action while it executes either in JavaScript, PowerShell, Python or VBScript. And each one of these languages will have access to specific objects. For example, I have the action object here. Here I'm telling the action to send a log message with this specific string and then use action.action action description or for example action dot
[01:07] (external link, opens in new tab) Action log title or action name and that should basically execute to the log file every time I execute the action.