Azure DevOps introduced YAML-based pipeline definitions in 2018. By 2019 they are the recommended approach, replacing the visual classic pipeline editor with version-controlled pipeline definitions.

The YAML pipeline model

YAML pipelines define the pipeline structure in code: triggers, variables, stages, jobs, and steps are all expressed in a .azure-pipelines.yml file in the repository. The pipeline definition is version-controlled alongside the code it builds. Pull requests that modify the pipeline trigger pipeline validation. The history of pipeline changes is in Git history. The pipeline is no longer an external configuration artifact separate from the code.

Multi-stage pipelines

YAML multi-stage pipelines define the full CI/CD workflow from build to production deployment in a single file. Stages (Build, Deploy-Dev, Deploy-Staging, Deploy-Prod) run sequentially with dependencies. The deployment stages use Environments, named targets with approval policies and deployment history. The build stage produces artifacts that deployment stages consume, ensuring the same artifact promoted through environments.

Template composition

YAML pipeline templates allow common step sequences to be extracted and referenced from multiple pipelines. A build template defines the standard build steps; a deploy template defines the standard deployment steps; individual pipelines reference the templates with environment-specific parameters. Template composition enables a platform team to maintain standard pipeline practices across dozens of application pipelines without duplication.

Variable groups and runtime parameters

Variable groups store shared configuration (service connection names, environment URLs, feature flags) that multiple pipelines reference by group name. Runtime parameters allow pipeline-triggering users to provide values that affect pipeline behaviour, selecting a deployment target, enabling debug mode, or specifying an artifact version. Parameters are type-checked (boolean, string, number) and validated before the pipeline runs.