AZ-400 Practice Question: Design and implement build and release pipelines
You need to ensure that only specific branches can trigger a release to production in Azure Pipelines. What should you configure?
⚠ Common exam trap
Many candidates confuse branch filters on build pipeline triggers (which control when code is built) with branch filters on release pipeline artifact triggers (which control when releases are created from those builds), leading candidates to incorrectly select Option D.
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
✓
Add a branch filter to the release pipeline's artifact trigger.
A branch filter on the release pipeline's artifact trigger allows you to specify which branches of the source artifact (e.g., a build pipeline) should automatically trigger a release. By configuring this filter to only include branches like 'main' or 'release/*', you ensure that only builds from those specific branches can initiate a release to production, providing precise control over deployment triggers.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Add an approval gate that requires a manager to approve the release.
Why it's wrong here
Approval gates in Azure Pipelines provide manual sign-off checks before a release proceeds to a stage, but they do not evaluate or restrict which source branch triggered the release. A manager approving the deployment cannot prevent a release from being created or triggered from an unwanted branch, so this does not satisfy the requirement to restrict branch-triggered releases.
- ✗
Add a deployment gate that checks the source branch.
Why it's wrong here
Deployment gates (e.g., health, query, or custom gates) are evaluated after a release has already been triggered; they can pause or fail a deployment to a specific stage, but they cannot stop the release itself from being created. Because gates operate on the deployment level and are not able to inspect or filter the artifact's source branch at trigger time, they are not a mechanism for controlling release triggers.
- ✓
Add a branch filter to the release pipeline's artifact trigger.
Why this is correct
In Azure Pipelines, a release pipeline's artifact trigger can be configured with a branch filter to specify which branches of the source repository are allowed to initiate a release. When you add a branch filter under the artifact trigger of the release pipeline, only builds from those branches (or builds that match the filter) will cause a release to be created, directly meeting the requirement to restrict which branches can trigger a release.
- ✗
Add a branch filter to the build pipeline trigger.
Why it's wrong here
A build pipeline's branch filter determines which branches will cause the CI build pipeline to run, not which branches will trigger a release. Even if you filter the build trigger, the release pipeline's artifact trigger still controls which builds—regardless of the branch that built them—can start a release; therefore, modifying the build trigger does not restrict release activation to specific branches.
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
Build pipeline
A build pipeline is an automated sequence of steps that compiles source code into a deployable artifact, running tests and checks along the way.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.