Skip to main content
Version: 4.6

General Structure of the azure-pipelines.yml File

The contents of the azure-pipelines.yml file drive the selection of CI/CD pipeline logic to be executed and the configuration and customization of the pipeline and its actions. As a YAML structure, the data elements of the azure-pipelines.yml file are part of a hierarchy of complex objects, as follows:

Top-Level YAML ObjectPurpose / Function of the ObjectDefault
nameName of the pipeline, generally composed of built-in strings$(SourceBranchName)_$(BuildID)
triggerDefinition of conditions to trigger the pipelinetriggered by git branch update
prPull Request filternone
resourcesList of respositories defininng the V3 pipeline & containers on which to run itN/A
extendsA set of complex YAML objects passed to the V3 pipeline code to drive the pipeline behaviorN/A

Base pipeline settings

The first 3 YAML objects generally should not require modification from how they are originally generated. The typical settings for each of these are as follows:

name:

The default setting of $(SourceBranchName)_$(BuildID) will ensure a unique name for every execution of the pipeilne. The default name is composed of the source code branch and a unique pipeline execution run numeric label.

trigger:

The default setting is:
trigger:
batch: true
branches:
include:
- feature/*
exclude:
- master
This will cause the pipeline to be triggered automatically when any feature branch (a branch prefixed by the name path of "feature/") of the source code repository is updated. *Note that this does not include the update of the master branch itself, as the pipeline is normally expected to apply updates to the master branch as part of its own execution.*

pr:

The default of "none" means no filters will be applied to limit triggers to pull requests of any specific branches or file paths.

Pipeline Resources

The resources YAML object lists the resources used by the pipeline. In the case of a V3.5 pipeline, this section should be defined as follows and should not require modification:

resources:
repositories:
- { repository: templates, type: git, name: devexp-engg/automation, ref: release/v3.5 }

The repositories object points to the V3 CI/CD pipeline logic and the containers defines the Docker container that will be used to run the pipeline logic.