concurrency on a trigger, step, or block to control competing runs that share its key and scope. Choose cancel-intermediate to replace work that has barely started while letting an older run finish:
- The oldest run started less than 15 seconds ago.
- Less than 30 seconds have passed since the first run in that replacement chain started.
value: 2, a quick burst behaves like this:
If B arrives when A is already 15 seconds old, A stays instead. After either deadline, the policy keeps the oldest run and the newest runs that fit the configured retention window, cancelling intermediate runs. With
value: 2 and no queue_size, that means the oldest and newest. Cancelled work still holds its slot until it stops.
Once a built-in deploy or terraform:apply step starts, cancel-intermediate no longer cancels that pipeline run. This protection does not detect publishing or infrastructure changes inside arbitrary shell commands.
The replacement windows are part of cancel-intermediate; you do not need another setting. Other behaviors stay separate:
queuewaits for a slot without cancelling older runs.skipskips new work when the limit is reached.cancel-in-progresscancels older work without the age limits or deployment protection above.value: 0allows unlimited concurrency and does not apply these cancellations.
key, scope, and queue_size. Deployment steps still use their separate deployment-manager lock.