Invoke OtterScript
- 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
Invoke OtterScript
- Updated on 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.
Invoke OtterScript
Executes an OtterScript plan specified as a string.
Script usage:
Invoke-OtterScript( Text: <text>, [AdditionalVariables: <%(key1: value1, ...)>], [CaptureOutputVariables: <@(text)>] );
This operation may be prefixed with BuildMaster::
, although this is a built-in namespace and isn't really necessary.
Arguments:
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Script text (default) | text | Text | This argument is required. |
Additional variables | %(key1: value1, ...) | AdditionalVariables | Specify variables to pass in to the script using a map. For example: %(var1: MyVariableValue, var2: @(list,of,items)) |
Capture output variables | @(text) | CaptureOutputVariables | Specify variables to capture and set in the calling scope using a list. For example: @(filePath,errorMessage) |
Note: Runtime variables you've defined before executing an Invoke operation will not be visible to the invoked script, and variables that you set within the invoked script will not be available.
Example:
# This will output "Hello, Steve" Invoke-OtterScript ( Text: >> set $MyName = Steve; Log-Information Hello, `$MyName; >>, CaptureOutputArguments: @(MyName) ); # This will output "Hello, Steve" Log-Information Hello, $MyName;
Was this article helpful?