Explain the YAML pipeline structure in Azure Pipelines.
BeginnerConceptAzure DevOps, Bicep and Terraform
Answer
pipeline → stages → jobs → steps. Steps are tasks (AzureCLI@2, Docker@2) or scripts (script, bash, pwsh).
trigger:
branches: { include: [main] }
pool:
vmImage: ubuntu-latest
variables:
acrName: acrshop
stages:
- stage: Build
jobs:
- job: build
steps:
- script: echo "build $(Build.BuildId)"
- stage: Deploy
dependsOn: Build
condition: succeeded()
jobs:
- deployment: deploy
environment: shop-prod
strategy:
runOnce:
deploy:
steps:
- script: echo deploying
Jobs run on separate agents (possibly in parallel); stages run sequentially by default via dependsOn.
More on Azure DevOps, Bicep and Terraform
What services make up Azure DevOps?BeginnerWhat are branch policies in Azure Repos?BeginnerWhat are service connections and how should they authenticate?IntermediateWhat are environments in Azure Pipelines?IntermediateWhat deployment strategies do deployment jobs support?IntermediateHow do templates work in Azure Pipelines?Intermediate