Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

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?

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.

Path filters in the trigger section allow you to specify include and exclude patterns. By using exclude patterns for 'docs/*' and '*.md', the pipeline will not trigger when only documentation files are changed. Option B is incorrect because branch policies do not affect the pipeline trigger; they govern pull request requirements. Option C is incorrect because conditions are evaluated at runtime, whereas we want to avoid triggering the pipeline altogether. Option D is incorrect because disabling CI trigger would require manual or scheduled builds, which is less efficient than using path filters.

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.

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.