Courseiva
Question 75 of 823
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

Using a Paths Filter to Trigger Only on a Specific Monorepo Folder

Your team uses a monorepo in Azure Repos with multiple projects. You want to trigger a pipeline only when changes are made to a specific subfolder. Which configuration should you use?

Quick Answer

A 'paths' filter on the CI trigger is exactly what limits a pipeline to a specific monorepo subfolder — you list include or exclude path patterns, and Azure Pipelines only starts a run when a changed file actually falls inside those paths, so unrelated projects in the same repo stop triggering unnecessary builds.

⚠ Common exam trap

Candidates often confuse the checkout step's sparse checkout or path filtering with trigger-level path filtering, mistakenly believing that limiting what is downloaded also prevents the pipeline from being triggered by changes outside that path.

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

Add a 'paths' filter to the CI trigger.

Azure Pipelines CI triggers support a 'paths' filter that allows you to specify include or exclude patterns for file changes. When a monorepo contains multiple projects in separate subfolders, adding a 'paths' filter to the CI trigger ensures the pipeline only runs when changes are detected within that specific subfolder, avoiding unnecessary builds for unrelated projects.

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 a branch filter in the CI trigger.

    Why it's wrong here

    Branch filters limit triggers to specific branches, not paths.

  • Add a 'paths' filter to the CI trigger.

    Why this is correct

    Paths filter triggers the pipeline only when files in the specified path change.

  • Configure the checkout step to only include the subfolder.

    Why it's wrong here

    Checkout step controls what is downloaded, not the trigger.

  • Use a 'file_match' condition on the job.

    Why it's wrong here

    There is no 'file_match' condition; use paths filter.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on AZ-400

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Your organization uses GitHub and wants to implement a monorepo strategy for multiple related projects. Which approach best optimizes CI/CD pipeline performance by only building projects that have changed?

hard
  • A.Use a single workflow that builds all projects on every push
  • B.Use submodules to separate projects
  • C.Use workflow templates and composite actions
  • D.Use path filters in GitHub Actions workflows

Why D: GitHub Actions path filters (using `on.push.paths` or `on.pull_request.paths`) allow you to trigger workflows only when changes are made to specific directories or files. In a monorepo, this ensures that CI/CD pipelines run exclusively for the projects that have been modified, avoiding unnecessary builds and significantly improving performance.

Variation 2. Your organization uses GitHub for source control and Azure Pipelines for CI/CD. You have a monorepo with multiple projects. You need to design a pipeline that only builds and tests the projects that have changed in each commit. You want to minimize build time and avoid unnecessary runs. The pipeline should also handle dependencies between projects. Which approach should you use?

hard
  • A.Create a single pipeline that builds all projects on every commit
  • B.Configure path filters in the pipeline trigger, and use a custom script to detect dependencies and build only affected projects plus their dependents
  • C.Use a single pipeline with a condition that checks which files changed and runs only the corresponding job
  • D.Create separate pipelines for each project and trigger them manually

Why B: It uses path filters in the pipeline trigger to only run when files in the changed projects are modified, and a custom script detects dependencies between projects to also build any dependent projects. This minimizes build time while ensuring all affected projects are built. Option A builds all projects on every commit, which is inefficient. Option C only builds changed projects but ignores dependency chains, potentially breaking the build. Option D requires manual triggers, which is not automated and defeats the purpose of CI/CD.

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.