Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesHard
A large enterprise uses Azure DevOps to manage hundreds of release pipelines across multiple projects. Many of these pipelines share common deployment steps, such as deploying to an Azure Web App or creating a resource group. The DevOps team wants to standardize these common steps to ensure consistency, reduce duplication, and simplify maintenance. Changes to these common steps should propagate across all pipelines that use them. Which Azure DevOps feature should they implement?
- AYAML templates
- BTask groups
- CVariable groups
- DDeployment groups
Show answer & explanationAnswer & explanation
Correct answer: A. YAML templates
YAML templates allow defining reusable sets of tasks, stages, or jobs in a separate YAML file. These templates can then be referenced by multiple pipelines, ensuring consistency and centralizing maintenance. Changes to the template automatically apply to all consuming pipelines upon the next run.
Why the other options are wrong
- B. Task groups encapsulate a sequence of tasks but are primarily for classic pipelines and don't offer the same level of YAML-based reusability and templating across stages/jobs as YAML templates.
- C. Variable groups store variables, not sequences of tasks or deployment steps.
- D. Deployment groups are logical collections of deployment targets, not a mechanism for reusing pipeline steps.
YAML Templates (Azure Pipelines)
Reusable YAML files that define common pipeline structures (tasks, jobs, stages) which can be referenced across multiple Azure Pipelines, promoting consistency and reducing duplication.
- Enables definition of reusable tasks, jobs, or stages.
- Centralizes pipeline logic, simplifying maintenance.
- Changes to templates propagate to consuming pipelines.
- Supports parameters for customization.
Memory trick: YAML templates are like stencils for pipelines, ensuring every drawing is consistent.