Skip to content

Commit 87d1748

Browse files
authored
Update conditions.md
In Line 146, the 'Stage2' has Job B. So in the below statement, the job in 'stage2' should be job 'B' and not 'A' --------------- If you queue a build on the `main` branch, and you cancel it while `stage1` is running, `stage2` *won't* run, even though it contains a job `B` whose condition evaluates to `true`. ---------------
1 parent 979605f commit 87d1748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pipelines/process/conditions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ stages:
126126

127127
If you queue a build on the `main` branch, and you cancel it while `stage1` is running, `stage2` will still run, because `eq(variables['Build.SourceBranch'], 'refs/heads/main')` evaluates to `true`.
128128

129-
In this pipeline, `stage1` depends on `stage2`. Job `B` has a `condition` set for it.
129+
In this pipeline, `stage2` depends on `stage1`. Job `B` has a `condition` set for it.
130130

131131
```yml
132132
stages:
@@ -143,7 +143,7 @@ stages:
143143
- script: echo 2
144144
```
145145

146-
If you queue a build on the `main` branch, and you cancel it while `stage1` is running, `stage2` *won't* run, even though it contains a job `A` whose condition evaluates to `true`. The reason is because `stage2` has the default `condition: succeeded()`, which evaluates to `false` when `stage1` is canceled. Therefore, `stage2` is skipped, and none of its jobs run.
146+
If you queue a build on the `main` branch, and you cancel it while `stage1` is running, `stage2` *won't* run, even though it contains a job `B` whose condition evaluates to `true`. The reason is because `stage2` has the default `condition: succeeded()`, which evaluates to `false` when `stage1` is canceled. Therefore, `stage2` is skipped, and none of its jobs run.
147147

148148
Say you have the following YAML pipeline. Notice that, by default, `stage2` depends on `stage1` and that `script: echo 2` has a `condition` set for it.
149149
```yaml

0 commit comments

Comments
 (0)