AZ-400 Practice Question: Design and implement a source control strategy
Exhibit
Refer to the exhibit.
```yaml
# azure-pipelines.yml
trigger:
branches:
include:
- main
- develop
pr:
branches:
include:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo "Building..."
```Refer to the exhibit. An Azure DevOps pipeline has the YAML configuration shown. A developer creates a pull request from a feature branch to the develop branch. What will happen?
⚠ Common exam trap
A common mix-up: candidates assume a pull request automatically triggers a pipeline, but Azure DevOps requires an explicit `pr` trigger for PR validation builds, and without it, no automatic execution occurs.
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
✓
The pipeline does not run automatically
The YAML configuration does not include a `trigger` or `pr` trigger, so by default the pipeline only runs on pushes to branches that have a pipeline configured, not on pull requests. Since the developer creates a PR from a feature branch to develop, and no trigger is defined for the feature branch or PR validation, the pipeline does not run automatically.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The pipeline runs only if the PR is merged
Why it's wrong here
Merging a PR is not an Azure Pipelines trigger by itself; merge completion only indirectly starts a run if the destination branch is in the CI trigger list. Since the YAML limits CI to develop and main and the PR target/branch is not one of those, the merged commit still won't trigger this pipeline, so it does not run at all.
- ✗
The pipeline runs as a CI build on the feature branch
Why it's wrong here
The YAML's `trigger` (CI) block is explicitly scoped to `develop` and `main`, not to feature branches. Therefore, pushing commits to the feature branch does not satisfy the branch filter and no automatic CI build is started.
- ✗
The pipeline runs as a PR validation build
Why it's wrong here
The `pr` (pull request validation) trigger is configured only for `main`, so PRs targeting a feature branch will not invoke this pipeline. Because the PR in the exhibit targets a feature branch (not `main`), no PR validation build is created.
- ✓
The pipeline does not run automatically
Why this is correct
The CI trigger only includes `develop` and `main`, while the PR trigger only includes `main`; the exhibited feature-branch push/PR matches neither branch filter. Consequently, the pipeline has no automatic trigger event and will not run on its own.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
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.
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 →
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.