Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesHard
A DevOps team is implementing a complex deployment process for a new application that consists of multiple microservices. Each microservice needs to be deployed to a separate Kubernetes namespace within an AKS cluster. The deployment pipeline must ensure that dependent microservices are deployed in the correct order and that, after each microservice deployment, a set of integration tests specific to that microservice are executed. Which Azure Pipelines feature is best suited to orchestrate this ordered, conditional, and test-driven deployment?
- ATask groups and variable groups.
- BClassic release pipelines with linked artifact filters.
- CMulti-stage YAML pipelines with dependencies and conditions.
- DDeployment groups with tags.
Show answer & explanationAnswer & explanation
Correct answer: C. Multi-stage YAML pipelines with dependencies and conditions.
Multi-stage YAML pipelines allow defining distinct stages for each microservice or logical deployment unit. Stage dependencies (`dependsOn`) enforce correct deployment order. Conditions can be used to ensure integration tests pass before proceeding to subsequent stages, making it ideal for complex, ordered, and test-driven microservice deployments.
Why the other options are wrong
- A. Task groups encapsulate tasks, and variable groups manage variables, but they don't provide the high-level orchestration, ordering, and conditional logic across multiple deployment phases that are required here.
- B. Classic release pipelines are being deprecated in favor of YAML. Linked artifact filters are for artifact consumption, not orchestrating deployment order or conditional testing.
- D. Deployment groups are for VM-based deployments, not Kubernetes namespaces. Tags help target, but don't orchestrate dependencies or complex test flows.
Multi-stage YAML Pipelines for Microservices
Multi-stage YAML pipelines in Azure DevOps orchestrate complex deployments with stages, dependencies, and conditions, ideal for managing ordered, test-driven microservice deployments.
- Define logical deployment phases as stages.
- Use `dependsOn` for enforcing stage order.
- Apply `conditions` for gatekeeping based on test results.
- Enables complex, ordered, and test-driven deployments.
Memory trick: Stages Depend, Conditions Confirm, Microservices Deploy.