Configuring a Run Command Step:
- Select the Promotion path document to which you want to add the Run Command step.
- Click the Create button – Run Command
- The Run Command document appears:
- In the Run Command document the Active radio button should be ‘Yes’. Fill in the Description and any desired comments.
- Enter the command to run in the Script field. This may be a single command-line command, a program to execute, or a series of commands, one per line.
- Optionally, enable Step fails on unexpected return value to fail the step if the return value of the command does not match. Note that when multiple commands are issued, only the return value of the last command will be returned/tested.
- Logging can be enabled either by importing or attaching the output of the command(s). Build manager will capture both Standard Out and Standard Error in this log.
- Additional validation of the results can be accomplished by enabling Additional Verification:
- A Regular Expression can be specified in RegEx to provide pattern matching and capturing capabilities to test the results
- If using capturing, a string template can be provided to receive the selected captures, and a string can be provided to compare it to. See the following section for details.
Capturing values via RegEx for comparison
When "Use RegEx to compare captured substring of pattern matches" is selected, Build Manager will process the verification in the following manner:
- Find each matching instance of the pattern in the log
- For each match, replace $ indexes in the Extract captured text field with values from groupings in the RegEx, creating a "replaced match"
- Compare each "replaced match" created in the last step to the value provided in the Match capture text to field
- If any of the "replaced matches" match the Match capture text to value, the step will succeed
- If no single "replaced match" matches the Match capture text to value, the step will fail.
For example, a RegEx like .*processed=(\d)\s*.*isnew=(\d).* and a Match string of  could be used to check if any line contained "processed=1; isnew=1" while failing to match any other values for "processed" or "isnew"