Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

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

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?

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

Configure path filters in the pipeline trigger, and use a custom script to detect dependencies and build only affected projects plus their dependents

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.

Answer analysis

Option-by-option breakdown

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

  • Create a single pipeline that builds all projects on every commit

    Why it's wrong here

    Creating a single pipeline that builds all projects on every commit triggers on any change and compiles every project regardless of which code actually changed, wasting compute time and delaying feedback for teams with large multi-project repositories. It does not scale efficiently and can generate noisy, redundant CI runs for unrelated changes.

  • Configure path filters in the pipeline trigger, and use a custom script to detect dependencies and build only affected projects plus their dependents

    Why this is correct

    Configuring path filters in the pipeline trigger limits pipeline runs to commits that touch relevant project paths, while a custom dependency detection script builds the transitive closure of affected projects and their dependents. This ensures that changes to a shared library still downstream projects to rebuild, maintaining artifact integrity while drastically reducing CI time compared to build-all approaches.

  • Use a single pipeline with a condition that checks which files changed and runs only the corresponding job

    Why it's wrong here

    Using a single pipeline with a condition that checks which files changed and runs only the corresponding job assumes each job is independent, but it does not handle dependencies between projects. If a shared library changes, the condition would only run the library's job, leaving dependent projects with stale builds and potentially breaking the integrated solution.

  • Create separate pipelines for each project and trigger them manually

    Why it's wrong here

    Creating separate pipelines for each project and triggering them manually removes automation and relies on developers to remember to run the right pipelines after each change. This is error-prone and does not automatically propagate builds when shared dependencies change, so dependent projects may be built against outdated upstream artifacts.

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.