Skip to content

Commit a904e1b

Browse files
committed
touchup
1 parent fed3409 commit a904e1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/pipelines/process/conditions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ stages:
111111

112112
### Stage example 2
113113

114-
In the following pipeline, `stage2` depends on `stage1` by default. Job `B` in `stage 2` has a `condition` set. If you queue a build on the `main` branch and cancel it while `stage1` is running, `stage2` doesn't run, even though it contains a job whose condition evaluates to `true`.
114+
In the following pipeline, `stage2` depends on `stage1` by default. Job `B` in `stage2` has a `condition` set. If you queue a build on the `main` branch and cancel it while `stage1` is running, `stage2` doesn't run, even though it contains a job whose condition evaluates to `true`.
115115

116116
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.
117117

@@ -209,7 +209,7 @@ The following table shows example `condition` settings to produce various outcom
209209
> [!NOTE]
210210
> `Release.Artifacts.{artifact-alias}.SourceBranch` is equivalent to `Build.SourceBranch`.
211211

212-
| Desired outcome | Condition setting |
212+
| Desired outcome | Example condition setting |
213213
| --------------- | ----------------- |
214214
| Run if the source branch is main, even if the parent or preceding stage, job, or step failed or was canceled. | `eq(variables['Build.SourceBranch'], 'refs/heads/main')` |
215215
| Run if the source branch is main and the parent or preceding stage, job, or step succeeded. | `and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))` |
@@ -237,7 +237,7 @@ The following table shows example `condition` settings to produce various outcom
237237

238238
### Parameters in conditions
239239

240-
Parameter expansion happens before conditions are considered. Therefore, when you declare a parameter in the same pipeline as a condition, you can embed the parameter inside the condition. The script in the following YAML file runs because `parameters.doThing` is true.
240+
Parameter expansion happens before conditions are considered. Therefore, when you declare a parameter in the same pipeline as a condition, you can embed the parameter inside the condition. The script in the following YAML runs because `parameters.doThing` is true.
241241

242242
```yaml
243243
parameters:
@@ -345,7 +345,7 @@ steps:
345345

346346
### How can I trigger a job if a previous job succeeded with issues?
347347

348-
You can use the result of the previous job in a condition. For example, in the following YAML file, the condition `eq(dependencies.A.result,'SucceededWithIssues')` allows job `B` to run because job `A` succeeded with issues.
348+
You can use the result of the previous job in a condition. For example, in the following YAML, the condition `eq(dependencies.A.result,'SucceededWithIssues')` allows job `B` to run because job `A` succeeded with issues.
349349

350350
```yaml
351351
jobs:

0 commit comments

Comments
 (0)