AZ-400 Practice Question: Design and implement build and release pipelines
You need to configure a build pipeline that triggers only when changes are pushed to the 'release/*' branch. Which trigger configuration should you use?
⚠ Common exam trap
Candidates often confuse branch triggers with tag triggers or forget that omitting a trigger defaults to 'include all branches', leading them to incorrectly select a tag-based option or a branch that doesn't match the required pattern.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Set 'trigger: branches: include: - release/*'
The YAML trigger configuration 'trigger: branches: include: - release/*' explicitly specifies that the pipeline should run only when changes are pushed to any branch matching the 'release/*' wildcard pattern. This is the standard way to define branch-based triggers in Azure Pipelines YAML, ensuring that only pushes to release branches initiate the build.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set 'trigger: none' in YAML
Why it's wrong here
Setting 'trigger: none' in YAML disables all automatic triggers, meaning the pipeline will not start on any branch push or pull request. It would require manual or scheduled runs, so it cannot satisfy the requirement to trigger on releases/* branches.
- ✓
Set 'trigger: branches: include: - release/*'
Why this is correct
Setting 'trigger: branches: include: - release/*' configures the pipeline to automatically run on every push to any branch matching the release/* wildcard. This precisely matches the requirement to trigger only for release branches, making it the correct choice.
- ✗
Set 'trigger: branches: include: - main'
Why it's wrong here
Setting 'trigger: branches: include: - main' limits the CI trigger exclusively to pushes targeting the main branch. Since release/* branches are not included, this configuration would not start the pipeline for releases, so it is incorrect.
- ✗
Set 'trigger: tags: include: - v*'
Why it's wrong here
Setting 'trigger: tags: include: - v*' configures the pipeline to trigger on Git tags that match the v* pattern, not on branch pushes. Because the requirement is specifically about branches, this option would not trigger on release/* branches and is therefore wrong.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Azure Pipelines
Azure Pipelines is a cloud-based CI/CD service from Microsoft that automatically builds, tests, and deploys code to any platform or cloud.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.