Courseiva
Design and implement build and release pipelinesmediumMultiple ChoiceObjective-mapped

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

Your organization uses GitHub for source control and Azure Pipelines for CI/CD. You need to implement a policy that requires all pull requests to pass a status check before merging. The status check should be provided by a pipeline that runs when a pull request is created. Which type of trigger should you configure in the pipeline YAML?

⚠ Common exam trap

A common mix-up: candidates confuse push triggers with PR triggers, thinking a push to the target branch will suffice, but the status check must be tied to the PR's merge commit or head branch, which only a PR trigger can automate.

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

PR trigger

A PR trigger (pr:) in Azure Pipelines YAML automatically runs the pipeline when a pull request is created or updated against a specified branch. This allows the pipeline to produce a status check that GitHub enforces as a required check before merging, fulfilling the policy requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Push trigger

    Why it's wrong here

    In Azure Pipelines, a push trigger only activates the pipeline when commits are pushed directly to a branch (like main or a feature branch), not when a pull request is opened or updated. PR validation requires a PR trigger, which specifically responds to pull request lifecycle events.

  • Manual trigger

    Why it's wrong here

    Manual trigger is not an actual pipeline trigger type in Azure Pipelines; it simply means you start a run on demand, either from the Azure DevOps web UI (Run Pipeline button), a REST API call, or using the Azure CLI for pipelines. Because it depends on a person or external service explicitly queueing a new run, it has no awareness of a pull request being opened or updated, so it cannot act as PR validation. PR validation requires an automatic trigger that is bound to the pull request lifecycle, which manual initiation fundamentally is not.

  • PR trigger

    Why this is correct

    A PR trigger in Azure Pipelines automatically starts a pipeline whenever a pull request is created or gets new commits, enabling validation of code changes before merging. This is the correct trigger type for validating pull requests, as it directly responds to PR events.

  • Scheduled trigger

    Why it's wrong here

    A scheduled trigger uses cron syntax to run the pipeline at defined times (e.g., nightly builds), independent of events like push or pull request activities. It cannot be used to validate pull requests because it does not react to PR creation or updates.

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.