Azure Pipelines is a cloud service that you can use to automatically build, test, and deploy your code to any cloud or on-premises. It’s a component of Azure DevOps Services, but you can use it to deploy projects that are hosted anywhere.
This documentation provides a comprehensive guide to understanding and utilizing Azure Pipelines for your continuous integration and continuous delivery (CI/CD) needs.
Begin your journey with Azure Pipelines by setting up your first project and pipeline. Follow these steps:
Refer to the Pipeline Basics section for more on defining your pipeline.
An Azure Pipeline is defined by a sequence of stages, jobs, and steps:
Azure Pipelines supports both YAML pipelines (recommended for modern development) and Classic Editor pipelines (a visual designer).
Azure Pipelines offers a robust set of features including multi-platform builds, integration with various services, advanced deployment strategies, and comprehensive reporting.
YAML pipelines allow you to define your CI/CD process as code, enabling versioning, auditing, and code reviews for your pipelines. This approach promotes a robust and repeatable deployment workflow.
A basic YAML pipeline structure might look like this:
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Build
jobs:
- job: BuildJob
steps:
- script: echo Building the application!
displayName: 'Run a one-line script'
- task: CmdLine@2
inputs:
script: |
echo Listing files
dir
displayName: 'Run a multi-line script'
- stage: Test
dependsOn: Build
jobs:
- job: TestJob
steps:
- script: echo Running tests...
displayName: 'Run Tests'
Explore detailed syntax and task references in the official Azure Pipelines documentation.
For those who prefer a visual interface, the Classic Editor provides a drag-and-drop experience to construct your build and release pipelines. This can be helpful for quick setup or for users less familiar with YAML syntax.
You can access the Classic Editor from your pipeline creation screen. While powerful, it's generally recommended to migrate to YAML for better source control and collaboration.
Azure Pipelines integrates seamlessly with a wide array of services and tools:
Leverage these integrations to create a comprehensive and automated DevOps workflow.