Dynamic step conditions

Dynamic Step Conditions allow steps to be skipped automatically based on variable values at runtime. When a condition evaluates to false, the step is marked as skipped (not failed), and the pipeline continues. This is the primary mechanism for skipping unnecessary work — particularly in monorepos where only changed services need to be built and tested.


Syntax

- step: name: My Step condition: changesets: includePaths: - "path/to/watch/**"

Or using variable-based state expressions:

- step: name: My Step condition: state: VARIABLE_NAME == expected_value

Condition Types

1. Variable State Conditions

Evaluate a boolean expression against pipeline output variables using condition: state::

- step: name: Deploy to Production condition: state: DEPLOY_ENABLED == true script: - ./deploy.sh production

Variable names in condition: state: are referenced without the $ prefix and values are not quoted -- use DEPLOY_ENABLED == true, not $DEPLOY_ENABLED == "true".

Supported Operators

Operator

Example

Description

==

VAR == value

Equality check

!=

VAR != value

Inequality check

>

COUNT > 0

Greater than

<

COUNT < 5

Less than