Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

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

Your company has a large monorepo with multiple microservices. You have a single YAML-based Azure Pipeline that builds the entire solution on every commit to the main branch. The pipeline takes over an hour to complete, causing long feedback loops. Developers often submit changes to only one service, but the whole pipeline runs. You need to reduce build time while maintaining quality. You are considering splitting the pipeline into multiple pipelines, each for a service, and using path triggers. However, some services have dependencies on shared libraries that are updated infrequently. You also need to ensure that integration tests that span multiple services still run when necessary. What should you do?

⚠ Common exam trap

A common mix-up: candidates think caching (Option B) or conditional stages (Option C) are sufficient, but they fail to address the need for integration tests across services when shared libraries change, which requires a separate comprehensive pipeline with path triggers.

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

Create separate pipelines for each service with path triggers, and create an additional comprehensive pipeline that triggers only when shared libraries change.

It uses path triggers to run only the pipeline for the changed service, drastically reducing build time. The additional comprehensive pipeline, triggered only when shared libraries change, ensures that integration tests spanning multiple services still run when dependencies are updated, maintaining quality.

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 separate pipelines for each service with path triggers, and create an additional comprehensive pipeline that triggers only when shared libraries change.

    Why this is correct

    This approach uses path-based triggers to run individual service pipelines only when their source changes, reducing build time and resource usage. The additional comprehensive pipeline, triggered only by modifications to shared libraries, ensures cross-service integration tests still run when dependencies change, preserving integration testing without unnecessary builds.

  • Keep the single pipeline but add caching for dependencies.

    Why it's wrong here

    While caching dependencies can speed up restore and build, the single pipeline still evaluates and builds all services on every commit, so you don't get the isolation or reduced pipeline duration that path triggers provide. It also doesn't address the need to run integration tests only when relevant code changes.

  • Use a single pipeline but add conditional stages to skip unchanged services.

    Why it's wrong here

    Conditional stages based on changed files (e.g., `git diff`) can skip stages, but they still require pipeline evaluation, repository checkout, and stage condition checks for every commit. This approach is less efficient than path triggers, which prevent the pipeline from even starting for unrelated changes, and it can become complex to maintain as services and dependencies grow.

  • Create separate pipelines for each service with path triggers, and disable the comprehensive pipeline.

    Why it's wrong here

    This eliminates the cross-service integration testing that is critical for microservices that share libraries or interact with each other. Without a comprehensive pipeline, changes to shared libraries won't trigger validation of all dependent services, allowing integration regressions to go undetected.

About these practice questions

One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.