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

  1. Create an azure-pipelines.yml in your repo root.
  2. Define triggers, pool, and stages:
trigger:
  - main
pool:
  vmImage: 'ubuntu-latest'
steps:
  - script: echo Hello, world!
  1. Commit and push; Azure DevOps detects and runs the pipeline.
  2. 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.