Azure DevOps CI/CD Pipeline: Complete Setup Guide for 2026
Want to automate your software delivery pipeline? Azure DevOps provides a complete CI/CD platform for building, testing, and deploying applications. This guide shows you how to set up a professional DevOps pipeline from scratch.
What is Azure DevOps?
Azure DevOps is a suite of development tools that includes:
- Azure Repos: Git repositories for source control
- Azure Pipelines: CI/CD automation
- Azure Boards: Agile project management
- Azure Test Plans: Manual and automated testing
- Azure Artifacts: Package management
Setting Up Your First CI/CD Pipeline
Step 1: Create an Azure DevOps Organization
- Go to dev.azure.com
- Sign in with your Microsoft account
- Create a new organization
- Create a new project
Step 2: Import Your Code
Import from GitHub, Bitbucket, or create a new repo:
# Clone the Azure Repo locally
git clone https://dev.azure.com/yourorg/yourproject/_git/yourrepo
# Add your code and push
git add .
git commit -m "Initial commit"
git push origin main
Step 3: Create a Build Pipeline (CI)
Create a azure-pipelines.yml file in your repository:
trigger:
- main
pool:
vmImage: ubuntu-latest
stages:
- stage: Build
jobs:
- job: BuildJob
steps:
- task: NodeTool@0
inputs:
versionSpec: 18.x
displayName: Install Node.js
- script: npm install
displayName: Install dependencies
- script: npm run build
displayName: Build application
- script: npm test
displayName: Run tests
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: dist
artifactName: drop
Step 4: Create a Release Pipeline (CD)
Add deployment stage to your pipeline:
- stage: Deploy
dependsOn: Build
jobs:
- deployment: DeployWeb
environment: production
strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
inputs:
azureSubscription: Your-Service-Connection
appName: your-app-name
package: /drop
Best Practices for Azure DevOps
1. Use YAML Pipelines
- Version controlled with your code
- Reviewable through pull requests
- Reusable with templates
2. Implement Branch Policies
- Require pull request reviews
- Run build validation before merge
- Enforce linked work items
3. Use Environments for Approvals
- Define environments: Dev, Test, Staging, Production
- Add approval gates for production
- Configure deployment windows
4. Secure Your Pipelines
- Use Azure Key Vault for secrets
- Enable OIDC for service connections
- Limit pipeline permissions
- Scan code with Microsoft Defender for DevOps
Azure DevOps Pricing
| Feature | Free Tier | Paid |
|---|---|---|
| Users | 5 Basic users | $6/user/month |
| Parallel jobs (Microsoft-hosted) | 1 free (1800 mins/month) | $40/job/month |
| Parallel jobs (Self-hosted) | 1 free | $15/job/month |
| Artifacts storage | 2 GB | $2/GB/month |
Azure DevOps vs GitHub Actions
| Feature | Azure DevOps | GitHub Actions |
|---|---|---|
| Project Management | ✅ Azure Boards | ❌ (use Projects) |
| Test Plans | ✅ | ❌ |
| Package Management | ✅ Artifacts | ✅ Packages |
| Enterprise Integration | Better | Good |
| Open Source | Limited | Better |
Need Azure DevOps Implementation?
Virtual Petals helps organizations implement Azure DevOps with automated CI/CD pipelines, security scanning, and infrastructure as code. Our DevOps engineers have deployed pipelines for 50+ projects.