Skip to content

Commit f29f1d5

Browse files
docs: document missing pipeline filter options (branch, build-reason, expression) (#530)
1 parent 005d226 commit f29f1d5

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/front-matter.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,14 @@ on: # trigger configuration (unified under on: key)
8484
- release/*
8585
filters: # optional runtime filters (compiled to gate step)
8686
source-pipeline: "Build*"
87+
branch: "refs/heads/main" # triggering branch (Build.SourceBranch)
8788
time-window:
8889
start: "09:00"
8990
end: "17:00"
91+
build-reason:
92+
include: [IndividualCI]
93+
exclude: [Schedule]
94+
expression: "eq(variables['Custom.Flag'], 'true')" # raw ADO condition
9095
pr: # PR trigger
9196
branches:
9297
include: [main]
@@ -236,7 +241,7 @@ errors for impossible or conflicting combinations:
236241
| `min-changes` > `max-changes` | Error | No PR can satisfy both constraints |
237242
| `time-window.start` = `time-window.end` | Error | Zero-width window never matches |
238243
| Same value in `author.include` and `author.exclude` | Error | Conflicting include/exclude |
239-
| Same value in `build-reason.include` and `build-reason.exclude` | Error | Conflicting include/exclude |
244+
| Same value in `build-reason.include` and `build-reason.exclude` | Error | Conflicting include/exclude *(both PR and pipeline filters)* |
240245
| Label in both `labels.any-of` and `labels.none-of` | Error | Label both required and blocked |
241246
| Label in both `labels.all-of` and `labels.none-of` | Error | Label both required and blocked |
242247
| Empty `labels` filter (no any-of/all-of/none-of) | Warning | No label checks applied |

prompts/create-ado-agentic-workflow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,14 @@ on:
367367
- release/*
368368
filters: # optional runtime filters (compiled to gate step with self-cancellation)
369369
source-pipeline: "Build*"
370+
branch: "refs/heads/main" # triggering branch (Build.SourceBranch)
370371
time-window:
371372
start: "09:00"
372373
end: "17:00"
374+
build-reason:
375+
include: [IndividualCI]
376+
exclude: [Schedule]
377+
expression: "eq(variables['Custom.Flag'], 'true')" # raw ADO condition
373378
```
374379

375380
When `on.pipeline` is set: `trigger: none` and `pr: none` are generated automatically. If `filters:` are configured under `on.pipeline`, a gate step is added to the Setup job that evaluates the filters and self-cancels the build when they do not match.

0 commit comments

Comments
 (0)