Script Based Triggers |
Top Previous Next |
Script Based Triggers allow you to use a Python or PowerShell script to determine if a build will be triggered.
Language The language you wish to use for the script. Currently Python and PowerShell are supported.
Iron Python Install Directory Optional: the directory where Iron Python is installed. Specifying this location allows you to import any of the modules shipped with IronPython.
Script The script to execute. In order for a build to be triggered, either Context.SetTriggered() or $context.SetTriggered() must be called. See below.
The Context object An object is made available to both languages that allows you to interact with the build server. In Python, it is exposed as a module called Context, which you do not need to import. In PowerShell, it is exposed as a variable called $context.
Context methods
Context.py stub A stub IronPython module has been provided to allow you to test scripts without needing to run them on the build server. This can be found in the <FinalBuilder Server Install Dir>\Examples.
Example.py A simple IronPython script demonstrating how to use the Context module. This can be found in the <FinalBuilder Server Install Dir>\Examples.
|