CI/CD pipelines, infrastructure as code, and deployment automation for Azure workloads
tier
standard
user-invokable
false
Skill: Azure DevOps Automation
CI/CD pipelines, infrastructure as code, and deployment automation for Azure workloads.
Metadata
Field
Value
Skill ID
azure-devops-automation
Version
1.0.0
Category
Cloud/Infrastructure
Difficulty
Advanced
Prerequisites
azure-architecture-patterns
Related Skills
azure-architecture-patterns, code-review
Overview
DevOps automation bridges development and operations, enabling rapid, reliable deployments. This skill covers Azure DevOps Services, GitHub Actions, and infrastructure as code patterns.
# What-if preview
az deployment group what-if `
--resource-group rg-myapp-dev `
--template-file main.bicep `
--parameters environment=dev
# Actual deployment
az deployment group create `
--resource-group rg-myapp-dev `
--template-file main.bicep `
--parameters environment=dev
Module 4: Environment Strategy
Environment Progression
Dev → Staging → Production
↓ ↓ ↓
Auto Manual Approval
Deploy Deploy Required
Azure DevOps Environments
# With approval gates-stage:DeployProdjobs:-deployment:DeployProductionenvironment:'production'# Configured with approversstrategy:runOnce:deploy:steps:-script:echoDeployingtoproduction
# .NET test with coverage-task:DotNetCoreCLI@2inputs:command:'test'arguments:'--collect:"XPlat Code Coverage"'-task:PublishCodeCoverageResults@1inputs:codeCoverageTool:'Cobertura'summaryFileLocation:'$(Agent.TempDirectory)/**/coverage.cobertura.xml'
Quality Gates
Gate
Threshold
Code coverage
≥80%
Test pass rate
100%
Security scan
0 critical/high
Lint errors
0
Module 6: Secrets and Security
Secret Management
Method
Use Case
Azure Key Vault
Production secrets
Pipeline Variables
Build-time values
GitHub Secrets
Action credentials
Azure App Configuration
Feature flags, config
Key Vault Integration
# Azure DevOps-task:AzureKeyVault@2inputs:azureSubscription:'Production'KeyVaultName:'kv-myapp-prod'SecretsFilter:'DatabaseConnectionString,ApiKey'-script:|
echo "Using secret from Key Vault"
# Secret available as $(DatabaseConnectionString)
# Health check after deployment-script:|
for i in {1..30}; do
response=$(curl -s -o /dev/null -w "%{http_code}" https://myapp.azurewebsites.net/health)
if [ "$response" = "200" ]; then
echo "Health check passed"
exit 0
fi
sleep 10
done
echo "Health check failed"
exit 1
Rollback Strategies
Strategy
Implementation
Redeploy previous
Trigger previous successful pipeline
Slot swap back
Swap staging back to production
Feature flag off
Disable problematic feature
Database rollback
Apply reverse migration
Blue-Green Deployment
# Deploy to staging slot-task:AzureWebApp@1inputs:appName:'my-app'slotName:'staging'# Swap slots after validation-task:AzureAppServiceManage@0inputs:Action:'Swap Slots'SourceSlot:'staging'
Quick Reference
Pipeline Checklist
Triggers configured (push, PR, schedule)
Build artifacts created
Unit tests run with coverage
Integration tests included
Security scanning enabled
Environment approvals configured
Secrets in Key Vault (not pipeline)
Health checks post-deployment
Rollback plan documented
Common Commands
# Azure CLI
az login
az account set --subscription "Production"
az deployment group create --resource-group rg --template-file main.bicep
# Azure DevOps CLI
az pipelines run --name "CI-Pipeline" --branch main
az pipelines build list --top 5
# GitHub CLI
gh workflow run ci.yml
gh run list --limit 5
Troubleshooting
Issue
Solution
Agent not available
Check agent pool, add agents
Secret not found
Verify Key Vault access policy
Deployment timeout
Increase timeout, check health
Test flakiness
Isolate tests, add retries
Permission denied
Check service connection, RBAC
Activation Patterns
Trigger
Response
"CI/CD", "pipeline", "DevOps"
Full skill activation
"GitHub Actions", "workflow"
Module 2
"Bicep", "IaC", "infrastructure as code"
Module 3
"deploy", "release", "environment"
Module 4
"rollback", "health check"
Module 7
Skill created: 2026-02-10 | Category: Cloud/Infrastructure | Status: Active