Courseiva
Design and implement build and release pipelineseasyMultiple ChoiceObjective-mapped

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

Your team uses Azure Repos and wants to trigger a pipeline automatically when a pull request is created targeting the main branch. The pipeline should run validations and report the status to the PR. Which trigger type should you configure?

⚠ Common exam trap

A common mix-up: candidates confuse CI triggers (which run on branch pushes) with PR triggers (which run on pull request events), especially when they see 'trigger on main branch' and incorrectly assume a CI trigger will handle PR validation.

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 is the correct choice because it specifically initiates a pipeline when a pull request is created or updated against a target branch (main). This allows the pipeline to run validations (e.g., builds, tests, linting) and report the status back to the PR via the Azure Repos status API, enabling branch protection policies to block merging if checks fail.

Answer analysis

Option-by-option breakdown

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

  • Path filter

    Why it's wrong here

    Path filters are a configuration feature within CI, PR, or other triggers that restrict which file paths cause a run; they do not define the event type itself. A path filter cannot independently trigger a pipeline because it only narrows the set of changes that match an already-configured trigger type, such as a push or pull request.

  • Scheduled trigger

    Why it's wrong here

    Scheduled triggers run a pipeline at specified cron-based times or intervals regardless of repository changes, so they are not event-driven by pull requests. Since the requirement is to trigger on a pull request event, a scheduled trigger would not react to PR creation or updates, making it incorrect for this scenario.

  • PR trigger

    Why this is correct

    PR triggers automatically start a pipeline when a pull request is created, updated, or reopened against a target branch, evaluating the merged result of the source and target branches. In Azure Pipelines, a PR trigger is the correct event type to validate changes before merging, and it can be configured specifically for individual or multiple branches, unlike CI triggers which only fire on direct pushes.

  • CI trigger

    Why it's wrong here

    CI triggers fire a pipeline when commits are pushed to a branch, not when a pull request is opened or updated. Because the goal is to trigger on PR events, a CI trigger would only run on the actual push to the source branch, which may not reflect the PR merge state, so it fails to meet the requirement.

Go deeper

Related to this question

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.