/cicd-tooling-skills:azure-pipelines-yaml-and-multi-stagefrom cicd-tooling-skills
Designs Azure Pipelines YAML, multi-stage pipelines with environments/approvals, reusable templates, and agent pool configuration. Use when setting up or troubleshooting Azure DevOps pipelines.
Ships in cicd-tooling-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Azure Pipelines (part of Azure DevOps) runs pipelines defined in
azure-pipelines.yml as a sequence of stages, each containing
jobs, each containing steps — with environments providing
approval gates and deployment history between stages, and templates
providing the reuse mechanism equivalent to GitHub Actions' reusable
workflows or GitLab's include:. This skill covers Azure Pipelines'
specific YAML schema, environment/approval mechanics, and template reuse
— not the generic pipeline-design concepts covered in
ci-cd-pipeline-design,
which apply here too but aren't repeated.
Pipelines → Environments) created ahead of time if
you want approval gates and deployment history — a stage's
deployment job references an environment by name, and the
environment must exist (and have its approval checks configured) before
the first run.Structure the pipeline as stages of jobs, mirroring how CodePipeline models stages of actions and GitHub Actions models a workflow's jobs:
# azure-pipelines.yml
trigger:
branches:
include: [main]
pool:
vmImage: ubuntu-latest
stages:
- stage: Build
jobs:
- job: BuildAndTest
steps:
- script: npm ci && npm test
displayName: "Install and test"
- script: npm run build
displayName: "Build"
- publish: dist
artifact: app-dist
- stage: DeployStaging
dependsOn: Build
jobs:
- deployment: DeployToStaging
environment: "checkout-api-staging"
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: app-dist
- script: ./deploy.sh staging
displayName: "Deploy to staging"
- stage: DeployProduction
dependsOn: DeployStaging
jobs:
- deployment: DeployToProduction
environment: "checkout-api-production"
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: app-dist
- script: ./deploy.sh production
displayName: "Deploy to production"
The deployment job type (vs. a plain job) is what unlocks
environment-linked approval gates and deployment history — a plain
job deploying via script has neither.
Configure the approval gate on the environment itself, not in the
YAML — in Azure DevOps, go to Pipelines → Environments → checkout-api-production → Approvals and checks, add the required
approvers. This is Azure Pipelines' equivalent of a GitHub Actions
protected environment: reviewer list or a GitLab when: manual job;
the YAML only references the environment name, the gate configuration
lives on the environment resource.
Extract shared logic into a template once two or more pipelines duplicate the same stage/job/steps:
# templates/build-and-test.yml
parameters:
- name: nodeVersion
type: string
default: "20.x"
steps:
- task: NodeTool@0
inputs:
versionSpec: ${{ parameters.nodeVersion }}
- script: npm ci && npm test
# consuming pipeline
steps:
- template: templates/build-and-test.yml
parameters:
nodeVersion: "18.x"
Templates can live in the same repo or a separate shared repo
referenced via a resources.repositories block, mirroring
github-actions-centralized-reusable-workflows's
centralized-repo pattern.
Pin template and task versions explicitly in a shared/centralized
setup — resources.repositories supports a ref (branch/tag), and
marketplace tasks are versioned (NodeTool@0); an unpinned ref: main
on a shared templates repo means every consumer's next run picks up
whatever the templates repo's main branch currently contains,
silently, with no PR to review.
Choose Microsoft-hosted vs. self-hosted agents deliberately:
Microsoft-hosted (pool: vmImage: ubuntu-latest) requires no
maintenance and starts fresh every run, but can't reach private
network resources and has a per-minute cost past the free tier;
self-hosted (pool: name: my-agent-pool) has persistent state (faster
for large dependency caches) and network access to internal systems,
but the org is responsible for patching and securing the agent host
itself.
Diagnose a stuck or failed run by opening the specific stage/job's
log, not just the pipeline summary — a deployment job's approval
step shows as "Waiting" until approved/rejected (check the
environment's pending approvals), and a failed step's raw log
(##[error] lines) has the actual command/exit-code detail the
pipeline-level red/green status doesn't surface.
deployment jobs with named environments for anything that
should have an approval gate and a deployment history — a plain job
running a deploy script has neither, and there's no audit trail of
who deployed what, when.resources.repositories template refs to a tag or commit for
production-facing pipelines, not a floating branch — see the pitfall
below.parameters block is validated and documented,
where copy-pasted YAML across pipelines silently drifts.Symptom: A shared templates repo's main branch changes, and every
consuming pipeline's next run silently behaves differently — no PR, no
changelog, just a different result.
Fix: Pin resources.repositories.ref to a specific tag or commit
SHA for anything production-facing; treat the templates repo like any
other versioned dependency, not a live-editable shared file.
Symptom: A deployment job's approval step sits in "Waiting"
indefinitely and nobody notices until someone asks why the release
hasn't gone out.
Fix: Configure the environment's approval notification (email/
Teams/Slack via a service hook) so pending approvals are actively
surfaced, not just visible if someone happens to check the
Environments page.
Symptom: A pipeline works fine on Microsoft-hosted agents in dev but fails to reach an internal artifact feed or database in staging/ production. Fix: That target requires self-hosted agents with network access to the private resource — Microsoft-hosted agents run in Azure's shared pool with no route to on-prem or VPC-internal systems unless exposed publicly (which is its own security tradeoff to weigh deliberately).
Symptom: A service connection was granted subscription-level Contributor/Owner "so the pipeline could deploy anything," and a bug in one pipeline's YAML deletes or modifies resources far outside what that pipeline should touch. Fix: Scope service connections to a specific resource group (or narrower) with only the roles the pipeline's actual deploy steps need — treat an overly broad service connection as a security finding.
Scenario: checkout-api builds once, then deploys through staging
and production with a required approval before production, using named
environments for the audit trail.
# azure-pipelines.yml
trigger:
branches:
include: [main]
pool:
vmImage: ubuntu-latest
stages:
- stage: Build
jobs:
- job: BuildAndTest
steps:
- template: templates/build-and-test.yml
parameters:
nodeVersion: "20.x"
- publish: dist
artifact: app-dist
- stage: DeployStaging
dependsOn: Build
jobs:
- deployment: ToStaging
environment: "checkout-api-staging"
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: app-dist
- script: ./deploy.sh staging
- stage: DeployProduction
dependsOn: DeployStaging
jobs:
- deployment: ToProduction
environment: "checkout-api-production" # approval check configured on this environment
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: app-dist
- script: ./deploy.sh production
The checkout-api-production environment has an approval check
configured (release manager + on-call lead, either can approve) in
Pipelines → Environments, so DeployProduction pauses and notifies
both approvers via the configured Teams service hook; the environment's
deployment history then shows exactly which run deployed to production,
when, and who approved it.
What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/aws-codepipeline-and-codedeployDesigns AWS CodePipeline stage/action structure and integrates it with CodeDeploy deployment groups and appspec.yml for EC2/on-prem, ECS, or Lambda deploys. Use when the user asks to "set up CodePipeline," "add a CodeDeploy deployment group," "write an appspec.yml," "wire CodePipeline to CodeDeploy," "troubleshoot a stuck/failed CodePipeline action," or "add a manual approval action before an AWS deploy."
/bamboo-pipeline-yaml-and-java-specsAuthors Atlassian Bamboo pipeline definitions using either Bamboo Specs (Java DSL, compiled and run to create/update a plan) or Bamboo's YAML specs format, covering plan/job/stage structure and how a Specs definition links to and updates a live Bamboo plan. Use when the user asks to "write a Bamboo Specs plan," "convert our Bamboo plan to code," "add a stage/job to a Bamboo build," "use Bamboo YAML specs," or "troubleshoot a Bamboo Specs plan not updating the linked plan."
/complete-cicd-pipeline-deployment-for-kubernetes-from-scratchBuilds a complete CI/CD pipeline for a Kubernetes-targeted service from an empty repo — source checkout, container image build, SCA/SAST security gates, registry push, and a deploy step that ends at a GitOps handoff (committing a new image tag to a manifests repo) rather than a direct kubectl apply or helm upgrade against the cluster. Use when the user asks to "build a full CI/CD pipeline for Kubernetes from scratch," "set up CI/CD that ends in a GitOps commit, not a cluster deploy," "wire a container build pipeline into Argo CD/Flux," or "go from an empty repo to a Kubernetes service deployed via GitOps end-to-end."
/complete-cicd-pipeline-deployment-for-serverless-from-scratchBuilds a complete CI/CD pipeline for a serverless (AWS Lambda-style) function from an empty repo — source checkout, zip/layer packaging (not a container image), SCA/SAST security gates, package upload, and a SAM/Serverless-Framework/CDK-style deploy step with alias-based canary traffic shifting, distinct from Kubernetes rollout mechanics. Use when the user asks to "build a full CI/CD pipeline for a Lambda function from scratch," "set up serverless CI/CD with canary traffic shifting," "wire SAM/Serverless Framework deploys into a pipeline," or "go from an empty repo to a function deployed with an alias-based canary."
/complete-cicd-pipeline-for-vm-based-workloads-from-scratchBuilds a complete CI/CD pipeline for a VM-based workload from an empty repo — source checkout, build, immutable machine-image baking (Packer-style AMI, not a container image or a zip), SCA/SAST security gates, and a deploy step that's either a blue-green instance-group swap or a config-management push (Ansible) to existing long-lived VMs, distinct from both container and serverless deploy mechanics. Use when the user asks to "build a full CI/CD pipeline for EC2/VM workloads from scratch," "bake an AMI in CI and roll it out blue-green," "push Ansible-managed config to existing VMs from a pipeline," or "go from an empty repo to a VM fleet deployed with a golden image and Auto Scaling Group swap."
/gitea-actions-and-ciConfigures Gitea Actions — Gitea's GitHub Actions-compatible CI/CD runner — including self-hosted act_runner setup/registration and the specific differences from GitHub Actions (supported contexts, missing features, runner labels). Use when the user asks to "set up CI on Gitea," "configure Gitea Actions," "register an act_runner," "port a GitHub Actions workflow to Gitea," or "troubleshoot a Gitea Actions job that isn't picked up by any runner."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin cicd-tooling-skillsOther plugins' skills for the same job