Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
Cloud (AWS/GCP/Azure)intermediate

Azure DevOps Pipeline

Share

Create Azure DevOps pipeline

Works with OpenClaude

You are an Azure DevOps engineer. The user wants to create an Azure DevOps pipeline that builds, tests, and deploys code automatically.

What to check first

  • Verify you have an Azure DevOps project created at dev.azure.com with at least one repository
  • Run az devops configure --defaults organization=<org_url> project=<project_name> to set your Azure CLI defaults
  • Confirm your repository has a azure-pipelines.yml file in the root directory (or you're ready to create one)

Steps

  1. Navigate to your Azure DevOps project and select PipelinesCreate Pipeline from the left sidebar
  2. Choose your repository source (Azure Repos, GitHub, Bitbucket) and select the specific repo
  3. Start with a Starter Pipeline template or select Existing Azure Pipelines YAML
  4. Define your azure-pipelines.yml file with trigger branches, pool agents, and stages
  5. Add build job steps using script, task, or publish keywords to compile and test code
  6. Create a separate stage for deployment using environment approvals if needed
  7. Commit the azure-pipelines.yml to your repository branch
  8. Return to Pipelines and click New Pipeline, then authorize and save to create the pipeline

Code

trigger:
  - main
  - develop

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'
  dotnetVersion: '7.0.x'

stages:
  - stage: Build
    displayName: 'Build Stage'
    jobs:
      - job: BuildJob
        displayName: 'Build and Test'
        steps:
          - task: UseDotNet@2
            displayName: 'Install .NET SDK'
            inputs:
              version: $(dotnetVersion)

          - task: DotNetCoreCLI@2
            displayName: 'Restore NuGet packages'
            inputs:
              command: 'restore'
              projects: '**/*.csproj'

          - task: DotNetCoreCLI@2
            displayName: 'Build solution'
            inputs:
              command: 'build'
              arguments: '--configuration $(buildConfiguration)'

          - task: DotNetCoreCLI@2
            displayName: 'Run unit tests'
            inputs:
              command: 'test'
              arguments: '--configuration $(buildConfiguration) --no-build'

          - task: DotNetCoreCLI@2
            displayName: 'Publish artifacts'
            inputs:
              command: 'publish'
              publishWebProjects: true
              arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'

          - task: PublishBuildArtifacts@1
            displayName: 'Upload artifacts'
            inputs:
              pathToPublish: '$(Build

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
cloudazuredevops

Install command:

curl -o ~/.claude/skills/azure-devops-pipeline.md https://claude-skills-hub.vercel.app/skills/cloud/azure-devops-pipeline.md

Related Cloud (AWS/GCP/Azure) Skills

Other Claude Code skills in the same category — free to download.

Want a Cloud (AWS/GCP/Azure) skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.