Pipeline loop
A pipeline loop enables automatic creation of multiple pipeline runs based on combinations of variable values. Instead of manually configuring each run with different variable values, you can define a list of values for selected variables, and Buddy will automatically generate a separate pipeline run for every combination.
Image loading...
How does it work?
A pipeline loop works as a matrix. When you define variables in the loop section:
- Single variable: each value creates a separate pipeline run
- Multiple variables: all combinations of values are executed
Example with two variables:
deployment_strategy:canary, rolling(2 values)region:eu-west, us-east, ap-south(3 values)- Result: 2 × 3 = 6 pipeline runs (each combination is a separate run)
GUI configuration
The pipeline loop configuration is located in the Run Strategy section under the pipeline’s Workflow tab.
Image loading...
Run Strategy
Execute — standard pipeline execution:
- Execute pipeline runs sequentially — a new run starts only after the previous one has finished (sequential execution)
- Execute pipeline runs in parallel — allows multiple runs of the same pipeline to be executed simultaneously
Image loading...
Loop — running pipelines in the matrix:
- Select existing variables from the list or add new ones
You can provide variables in two ways:
- Comma separated:
canary, rolling - Line by line:
defaulteu-west us-east ap-south- Comma separated:
Below is an example of a configured RUN STRATEGY where runs execute in parallel and two variables defined in the loop: deployment_strategy and region.
Image loading...
Sequentail vs parallel runs
The way runs generated by the loop are executed depends on the Execute pipeline runs setting.
Sequential execution
When you select Execute pipeline runs sequentially, the runs are executed one after another:
Image loading...
Each subsequent run starts only after the previous one has finished.
Parallel execution
When you select Execute pipeline runs in parallel, all runs start simultaneously:
Image loading...
YAML configuration
You can also configure a pipeline loop in the buddy.yml file. In the pipeline section, add the loop field with a list of variables.
Single-variable example
You can provide variable values separated by commas or on separate lines:
Variable (deployment_strategy):
defaultcanary, rolling
yaml- pipeline: Deploy to Production refs: - :default events: - type: PUSH loop: - deployment_strategy resources: XLARGE variables: - key: deployment_strategy value: "canary, rolling"
The configuration above will create 2 pipeline runs, one for canary one for rolling
Multi-variable example
Variable 1 - deployment_strategy:
defaultcanary, rolling
Variable 2 - region:
defaulteu-west us-east ap-south
Example pipeline using deployment_strategy and region variables:
yaml- pipeline: Deploy to Production refs: - :default events: - type: PUSH loop: - deployment_strategy - region resources: XLARGE variables: - key: deployment_strategy value: "canary, rolling" - key: region value: |- eu-west us-east ap-south
This will create 6 runs:
canary+eu-westcanary+us-eastcanary+ap-southrolling+eu-westrolling+us-eastrolling+ap-south
API
The pipeline loop is also available through the REST API. You can use the loop parameter when creating or editing a pipeline:
Last modified on Nov 17, 2025