Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your organization requires that all code changes must be built and tested before merging to the main branch. You plan to use branch policies in Azure Repos. Which policy enforcement will ensure that a pull request cannot be completed unless the build succeeds?

⚠ Common exam trap

Candidates often confuse a 'build validation' policy with other branch policies like 'Require a linked work item' or 'Minimum number of reviewers', thinking any policy that adds a check will enforce build success, but only build validation directly triggers and gates on a build pipeline result.

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 build validation policy that triggers a build on each PR update.

Azure Repos branch policies include a 'Build validation' policy that triggers a specified build pipeline on each pull request (PR) update. The policy enforces that the PR cannot be completed unless the build succeeds, directly meeting the requirement that all code changes must be built and tested before merging to the main branch.

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 a linked work item in the pull request.

    Why it's wrong here

    This policy enforces traceability by requiring a linked work item, but it does not validate the code. A pull request can still be completed even when the build is broken, because no compilation or testing is triggered.

  • Require a minimum number of reviewers.

    Why it's wrong here

    Requiring a minimum number of reviewers mandates peer approval before merging, but reviewers can approve without a successful build. This policy does not run a build on the pull request, so broken code can still be merged.

  • Add a build validation policy that triggers a build on each PR update.

    Why this is correct

    Adding a build validation policy queues a build on every pull request update and blocks completion unless the build succeeds. This directly enforces that all code changes are built successfully before merging, preventing broken code from entering the target branch.

  • Reset code reviewer votes when new changes are pushed.

    Why it's wrong here

    Resetting reviewer votes when new changes are pushed invalidates previous approvals and forces re-review, but it does not execute any build. This policy has no effect on build status, so code that fails to compile can still be merged.

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 →

How Courseiva writes practice questions · Editorial policy

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.