From magic-powers
Use when implementing release management on Azure DevOps — deployment gates (quality gates), pre/post-deployment approvals, deployment rings, rollback strategies, deployment freeze windows, and multi-environment promotion.
npx claudepluginhub kienbui1995/magic-powers --plugin magic-powersThis skill uses the workspace's default tool permissions.
- Need quality gates before production deployment (smoke tests, monitor alerts)
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
# azure-pipelines.yml — production stage uses environment with checks
stages:
- stage: Deploy_Prod
jobs:
- deployment: DeployProd
environment: production # approvals and checks configured on this environment in UI
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: drop
- task: AzureWebApp@1
inputs:
appName: myapp-prod
Configure via UI: Pipelines → Environments → production → Approvals and checks:
main or release/* branches# Classic release pipeline gates — automated pre/post-deployment checks
# Pre-deployment gate: Azure Monitor alert query
Gate: Azure Monitor
Query: "customEvents | where name == 'AppError' | where timestamp > ago(30m)"
Threshold: fewer than 5 errors in 30-minute window
Sampling interval: 5 minutes
Timeout: 30 minutes (fail if not passing within timeout)
# REST API gate — call any endpoint as gate
Gate: Invoke REST API
URL: https://api.myapp.com/health
Success criteria: eq(root['status'], 'healthy')
Sampling interval: 10 minutes
YAML pipeline equivalent — environment checks:
# In YAML pipelines, add gates via environment checks (not pipeline YAML)
# Pipelines → Environments → production → Approvals and checks:
# "Invoke Azure Function" — run custom logic, return pass/fail
# "Query Azure Monitor" — check alert state before deploy
# "Required template" — enforce pipeline template usage
stages:
- stage: Ring0_Canary
displayName: Ring 0 - Canary (5% traffic)
jobs:
- deployment: DeployCanary
environment: canary
strategy:
canary:
increments: [10, 20]
preDeploy:
steps:
- script: echo "Deploying to canary ring"
postRouteTraffic:
steps:
- task: AzureMonitor@1
inputs:
connectedServiceName: Azure-ServiceConnection
# Monitor error rate for 10 minutes at each increment
on:
failure:
steps:
- script: echo "Canary unhealthy — initiating rollback"
- stage: Ring1_EarlyAdopters
displayName: Ring 1 - Early Adopters (20%)
dependsOn: Ring0_Canary
condition: and(succeeded(), eq(variables['canaryHealthy'], 'true'))
jobs:
- deployment: DeployEarlyAdopters
environment: early-adopters
- stage: Ring2_Production
displayName: Ring 2 - Production (100%)
dependsOn: Ring1_EarlyAdopters
condition: succeeded()
jobs:
- deployment: DeployProduction
environment: production # approval gate here
# Option 1: Redeploy previous artifact (universal — works for any app type)
- stage: Rollback
condition: failed() # trigger automatically if deploy stage failed
jobs:
- deployment: RollbackDeploy
environment: production
strategy:
runOnce:
deploy:
steps:
- download: specific
pipeline: $(Build.DefinitionId)
buildVersionToDownload: latestFromBranch
branchName: refs/heads/main
artifact: drop
- task: AzureWebApp@1
inputs:
appName: myapp-prod
package: $(Pipeline.Workspace)/drop/*.zip
# Option 2: Slot swap rollback (Azure App Service — instant, zero-downtime)
- task: AzureAppServiceManage@0
displayName: Swap slots to rollback
inputs:
action: 'Swap Slots'
azureSubscription: Azure-ServiceConnection
appName: myapp-prod
sourceSlot: production
targetSlot: staging # swap back to known-good staging version
# Option 1: Branch protection — block merges to main during freeze
# Create branch protection rule preventing PRs to main for freeze period
# Environment check "Branch control" then prevents deploys from non-main branches
# Option 2: Azure Function gate — check maintenance calendar
# Add "Invoke Azure Function" check on production environment
# Function returns 200 = allowed, 4xx = blocked with reason message
# Option 3: Manual approval with informational message to approvers
# Approval check instructions: "Deployment freeze active until [date].
# Contact devops@ for emergency override. Log override reason in ticket."
# Option 4: Schedule-based gate using pipeline schedule
schedules:
- cron: '0 2 * * 1-5' # weekdays 2am only
displayName: Nightly deploy window
branches:
include: [main]
always: false # only run if there are changes
# Promotion: same artifact, progressive environments
variables:
artifactVersion: $(Build.BuildId)
stages:
- stage: Build
jobs:
- job: Build
steps:
- task: PublishPipelineArtifact@1
inputs:
artifactName: release-$(artifactVersion)
- stage: Deploy_Staging
dependsOn: Build
jobs:
- deployment: DeployStaging
environment: staging # automated checks only
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: release-$(artifactVersion)
- script: ./run-smoke-tests.sh staging
- stage: Deploy_Production
dependsOn: Deploy_Staging
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployProduction
environment: production # human approval + monitor gate
ado-pipeline-design — the multi-stage pipeline structure that release management builds uponado-pipeline-optimization — optimize the build pipeline that feeds into the releaseado-pipelines-ops — environments and approval infrastructure setup (creating environments, adding checks via UI)