Conditional execution implements if-then-else branching
for a step.
Simple If-Then execution:
- Set the step type to Conditional.
- Set the condition to an expression that can be evaluated.
- Fill in the command to be run.
- If desired, specify an inline to run. (You can leave Command blank
if Inline is set.)
If Condition evaluates to true when the job runs, the step is run.
If specified, the Inline project or library also runs. If the expression
evaluates to false, it is skipped and job execution proceeds to the
next step.
If-Then-Else execution:
If you wish to run a different command and/or inline if Condition
returns false, fill in additional properties:
- Fill in the Else command to run.
- If desired, specify an Else Inline project or library to run.
(Else Command can be blank if an Else Inline is set.)
During job execution, the step result is marked Pass if the condition
is evaluated successfully and the commands in Command or Else command
are run successfully. To determine which path was taken, you must
look at the log.
See also Condition functions.