AZ-400 Practice Question: Design and implement build and release pipelines
A company uses Azure Pipelines with YAML-based pipelines stored in a Git repository. The pipeline triggers on every push to the main branch, but the team wants to reduce unnecessary builds when only documentation files are changed. What is the best way to achieve this?
⚠ Common exam trap
AZ-400 often tests the difference between trigger-time path filters and runtime conditions — candidates pick 'condition' thinking it prevents the build, but it only skips steps after the agent starts.
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
✓
Use path filters in the trigger section to exclude 'docs/*' and '*.md' files.
Azure Pipelines YAML triggers support 'paths' with 'include' and 'exclude' filters, so adding 'exclude: - docs/* - *.md' under the trigger prevents builds when only documentation changes. This is evaluated at trigger time by the service, so no agent minutes are consumed. It is the native, declarative mechanism for path-based CI filtering.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use path filters in the trigger section to exclude 'docs/*' and '*.md' files.
Why this is correct
Path filters in the trigger section use `trigger.paths.exclude` to prevent pipeline execution when only files under `docs/*` or matching `*.md` are changed; any other changed file will still trigger the pipeline, making this the correct, event-driven way to avoid documentation commits.
- ✗
Configure branch policy to require a pull request for documentation changes.
Why it's wrong here
A branch policy requiring a pull request controls how code is merged into the branch; it does not suppress the CI trigger, so a push to a feature branch containing only documentation changes still starts the pipeline, which is exactly what you want to avoid.
- ✗
Add a 'condition' to the pipeline that checks if changed files are documentation.
Why it's wrong here
A `condition` is evaluated only after the pipeline has already been triggered and its initializations are complete; it can skip stages, jobs, or steps based on the build reason or variables, but it cannot stop the pipeline from being queued, so doc-only pushes would still consume agents and show failed/skipped runs.
- ✗
Disable CI trigger and rely on scheduled builds.
Why it's wrong here
Disabling the CI trigger and relying on scheduled builds means documentation changes are not picked up immediately, causing stale or unpredictable build states; scheduled builds also run on arbitrary cadences rather than reacting to events, so they cannot selectively ignore doc-only commits and may miss critical fixes between windows.
Go deeper
Related to this question
Learn chapter
Implementing Security and Compliance in Pipelines
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
Key term
Git
Git is a version control system that tracks changes to files so multiple people can work on the same project without overwriting each other's work.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 696 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
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.