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 Object | Purpose / Function of the Object | Default |
|---|---|---|
| name | Name of the pipeline, generally composed of built-in strings | $(SourceBranchName)_$(BuildID) |
| trigger | Definition of conditions to trigger the pipeline | triggered by git branch update |
| pr | Pull Request filter | none |
| resources | List of respositories defininng the V3 pipeline & containers on which to run it | N/A |
| extends | A set of complex YAML objects passed to the V3 pipeline code to drive the pipeline behavior | N/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:
trigger:
trigger:
batch: true
branches:
include:
- feature/*
exclude:
- master
pr:
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.