How do templates work in Azure Pipelines?
IntermediateConceptAzure DevOps, Bicep and Terraform
Answer
Templates reuse YAML: step, job, stage and variable templates included with template: and typed parameters. Extends templates wrap an entire pipeline, so the platform team controls the skeleton (security scans, approval stages) and app teams supply only parameters:
resources:
repositories:
- repository: templates
type: git
name: platform/pipeline-templates
ref: refs/tags/v3
extends:
template: aks-service.yml@templates
parameters:
serviceName: shop-web
Pair it with the environment check "Require template" so prod deployments only happen through the approved template.
More on Azure DevOps, Bicep and Terraform
What services make up Azure DevOps?BeginnerWhat are branch policies in Azure Repos?BeginnerExplain the YAML pipeline structure in Azure Pipelines.BeginnerWhat are service connections and how should they authenticate?IntermediateWhat are environments in Azure Pipelines?IntermediateWhat deployment strategies do deployment jobs support?Intermediate