BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)Pipeline trigger rules
Lesson287 words

Pipeline trigger rules

Develop and implement pipeline trigger rules

Triggers decide when a pipeline runs. The single most examinable fact is what happens when you write nothing at all.

The defaults are ON

If you do not explicitly configure triggers, all branches have CI triggers enabled, and PR triggers are enabled for pull requests to any branch.

This surprises people who assume an unconfigured pipeline is inert. To switch them off you must say so explicitly:

yaml
trigger: none # no CI trigger pr: none # no PR trigger

Two overrides can defeat what the YAML says: the Disable implied CI trigger setting, and UI settings override YAML trigger. If a pipeline is not firing as the file suggests it should, those are the first places to look.

Filtering

yaml
trigger: branches: include: [ main, releases/* ] exclude: [ releases/legacy/* ] paths: include: [ src/* ] exclude: [ docs/* ] batch: true
  • Exclude beats include. A branch matching both is excluded.
  • Path filters stop documentation-only commits from burning agent time.
  • batch: true collects commits arriving during an in-flight run and runs them together when it finishes, instead of queueing one run per push.

Scheduled triggers

yaml
schedules: - cron: "0 2 * * *" displayName: Nightly branches: include: [ main ] always: false

always: false — the default — means the scheduled run is skipped when nothing has changed since the last successful scheduled run. Set it to true for jobs that must run regardless, such as a nightly dependency scan.

Cron here is UTC, which is the usual source of "why did it run an hour early" after a daylight-saving change.

Primary sources

  • https://learn.microsoft.com/en-us/azure/devops/pipelines/build/triggers
  • https://learn.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning277 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.