Stage and Step Conditional Execution Settings

Updated 1 month ago by Michael Cretzman

This topic describes Pipeline stage and step Conditional Executional settings.

Review: Stage and Step Priority

The stage Conditional Execution applies to all steps that do not have their own Conditional Execution. A step's Conditional Execution overrides its stage's Conditional Execution.

Stage Conditions

Execute This Stage if Pipeline Execution is Successful so Far

Select this option if you only want this stage to run when all previous stages were successful.

This is the default setting and used most of the time.

Always execute this stage

Select this option if you always want this stage to run regardless of the success or failure of previous stages.

Execute This Stage Only if Prior Pipeline or Stage Failed

Select this option if you always want this stage to run only if the prior Pipeline or stage failed.

And execute this stage only if the following JEXL Condition evaluates to True

Only execute this stage is a JEXL expression is met (evaluates to true).

In the JEXL expression, you could use any of the Pipeline variables, including the output of any previous steps.

Examples:

  • <+steps.step1.status> == “SUCCESS”
  • <+steps.step1.currentStatus> == “SUCCESS”
  • <+environment.name> != “QA”

See Built-in Harness Variables Reference.

Step Conditions

Execute this step if the stage execution is successful thus far

Select this option if you only want this step to run when all previous steps were successful.

This is the default setting and used most of the time.

Always execute this step

Select this option if you always want this step to run regardless of the success or failure of previous steps.

Execute this step only if prior stage or step failed

Select this option if you always want this step to run only if the prior stage or step failed.

And execute this step only if the following JEXL Condition evaluates to True

Only execute this step is a JEXL expression is met (evaluates to true).

In the JEXL expression, you could use any of the Pipeline variables, including the output of any previous steps.

Examples:

  • <+steps.step1.status> == “SUCCESS”
  • <+steps.step1.currentStatus> == “SUCCESS”
  • <+environment.name> != “QA”

See Built-in Harness Variables Reference.


Please Provide Feedback