Courseiva
Design and implement build and release pipelineseasyMultiple ChoiceObjective-mapped

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

Client DHCP Server 1 Discover (broadcast) 2 Offer (IP: 192.168.1.10) 3 Request (I accept) 4 Acknowledge (lease confirmed) DORA — the four-step DHCP lease process

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 →

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.