How to set up a CI/CD pipeline in Azure DevOps
· Category: Cloud Computing
Short answer
Azure Pipelines provides CI/CD automation using YAML files stored in your repository to define build and release stages.
Steps
- Create an
azure-pipelines.ymlin your repo root. - Define triggers, pool, and stages:
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo Hello, world!
- Commit and push; Azure DevOps detects and runs the pipeline.
- Add deployment jobs with environments and approvals.
Tips
- Use templates for reusable pipeline logic.
- Variable groups store secrets and shared configuration.
- Self-hosted agents provide custom build environments.
Common issues
- YAML indentation errors break pipeline parsing.
- Service connections must be authorized before deployments.