AZ-400 Practice Question: Design and implement build and release pipelines
Your team uses Azure Repos Git and wants to enforce a policy that all pushes to the main branch must pass a build validation pipeline. The pipeline runs unit tests and code analysis. You need to configure this in the branch policy. Which setting should you enable?
⚠ Common exam trap
Test-takers frequently confuse Build validation with other PR policies like Require comment resolution or Linked work items, mistakenly thinking those options also enforce automated checks, when in fact only Build validation triggers a pipeline execution.
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
✓
Build validation
The Build validation policy in Azure Repos Git enforces that a specified pipeline must succeed before a pull request can be merged into the target branch. This directly meets the requirement to run unit tests and code analysis on all pushes to the main branch, blocking merges if the build fails.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Require comment resolution
Why it's wrong here
Require comment resolution is a branch policy that prevents pull requests from being completed until all active comment threads are resolved. It is a collaboration and review workflow control, not an automated verification of code quality, so it does not enforce a successful build.
- ✗
Linked work items
Why it's wrong here
This policy mandates that every pull request must be associated with at least one linked work item, ensuring traceability between code changes and project management tasks. It does not validate that the code compiles or passes tests, so it cannot act as a CI gate for build success.
- ✗
Limit merge types
Why it's wrong here
Limit merge types restricts the merge strategies (e.g., merge commit, squash, rebase) available when completing a pull request. While it helps maintain a desired git history, it has no effect on whether the code builds, so it is not a substitute for automated build validation.
- ✓
Build validation
Why this is correct
Build validation automatically triggers a configured build pipeline on each push to a pull request and blocks completion until the build succeeds. It acts as a continuous integration gate that catches compilation errors, test failures, and other issues, thereby enforcing a successful build on every code change.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pull request
A pull request is a way for a developer to propose changes to a codebase and ask other team members to review and merge them into the main project.
Key term
Branch policy
A branch policy is a set of rules and conditions enforced on a Git branch to control how code changes are proposed, reviewed, and merged, ensuring code quality and protecting critical branches.
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.