title | description | ms.topic | ms.author | author | ms.date | monikerRange |
---|---|---|---|---|---|---|
YAML vs Classic Pipelines |
Learn the basics about Azure Pipelines and explore the different features available for both YAML and Classic pipelines. |
overview |
sdanie |
steved0x |
06/12/2024 |
<= azure-devops |
[!INCLUDE version-lt-eq-azure-devops]
Azure Pipelines enables developers to automate a wide variety of tasks, ranging from executing a batch file to setting up a complete continuous integration (CI) and continuous delivery (CD) solution for their applications.
Azure Pipelines supports a wide range of languages, platforms, and tools, and offers two types of pipelines to choose from: YAML-based and Classic pipeline editors.
Note
If you are new to Azure Pipelines, it is recommended to start with YAML pipelines. For existing Classic pipelines, you can choose to continue using them or migrate to YAML pipelines.
Your pipeline configuration resides in a YAML file named azure-pipelines.yml
, alongside your application.
-
The YAML file is versioned alongside your application code, adhering to the same branching structure.
-
Each branch can customize the pipeline by editing the
azure-pipelines.yml
file. -
Keeping the pipeline configuration in version control ensures that any changes that cause issues or unexpected outcomes can be easily identified within your codebase.
For instructions, see Create your first pipeline for a step by step guide to building a sample application from a Git repository.
::: moniker range="<=azure-devops"
Classic pipelines are created in the Azure DevOps web portal with the Classic user interface editor. You can define a pipeline to build, test your code, and then publish your artifact (binary). Additionally, you can define a release pipeline to consume your binary (artifact) and deploy it to specific targets.
::: moniker-end
For instructions, see build and deploy for step by step guides to building and deploying your application with Classic Pipelines.
::: moniker range="azure-devops"
Feature | Description | YAML | Classic Pipeline | Classic Release |
---|---|---|---|---|
Agents | A software component that runs on a virtual machine or a physical machine and is responsible for executing the tasks defined in your Azure Pipelines. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Approvals | Control your deployment workflow by requiring designated approvers to approve before deploying to a stage. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Artifacts | Download and publish your binaries and various types of packages to different destinations. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Caching | Reduce build time by caching and reusing dependencies from previous runs. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Conditions | Specify conditions under which a step, job, or stage should run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Container jobs | Specify jobs to run in a container. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Demands | Ensure that the capabilities your pipeline needs are present on the running agent. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Dependencies | Specify a requirement that must be met in order to run the next stage. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Deployment groups & Environments | Deployment groups (Classic): Define a set of target machines each equipped with a deployment agent. Environments (YAML): A collection of resources targeted for deployment. |
:::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Deployment jobs | A collection of deployment steps that are run sequentially against the environment. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Gates | Automate release controls by evaluating health signals from external services before completing a deployment. | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Jobs | A series of sequential steps that form the smallest unit of work that can be scheduled to run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Library | A collection of assets that can be used in your Azure Pipelines. The Library contains two types of assets: Variable groups and Secure files. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Service connections | Enable connection to an external service required to execute tasks in a job. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Service containers | Enable you to manage the lifecycle of a containerized service. most commonly used with container jobs. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Stages | Organize jobs within a pipeline. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Task groups | Encapsulate a sequence of tasks into a single reusable task. | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Tasks | The building blocks that define the steps that make up a pipeline job. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Templates | Define reusable content, logic, and parameters. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Triggers | Define the event that causes a pipeline to run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Variables | A placeholder for values that can be used throughout your pipeline's execution. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Variable groups | Use to store values and secrets that you want to manage and share across multiple pipelines. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
::: moniker-end
::: moniker range="azure-devops-2020 || azure-devops-2022"
Feature | Description | YAML | Classic Pipeline | Classic Release |
---|---|---|---|---|
Agents | A software component that runs on a virtual machine or a physical machine and is responsible for executing the tasks defined in your Azure Pipelines. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Approvals | Control your deployment workflow by requiring designated approvers to approve before deploying to a stage. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Artifacts | Download and publish your binaries and various types of packages to different destinations. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Conditions | Specify conditions under which a step, job, or stage should run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Container jobs | Specify jobs to run in a container. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Demands | Ensure that the capabilities your pipeline needs are present on the running agent. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Dependencies | Specify a requirement that must be met in order to run the next stage. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Deployment groups & Environments | Deployment groups (Classic): Define a set of target machines each equipped with a deployment agent. Environments (YAML): A collection of resources targeted for deployment. |
:::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Deployment jobs | A collection of deployment steps that are run sequentially against the environment. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Gates | Automate release controls by evaluating health signals from external services before completing a deployment. | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Jobs | A series of sequential steps that form the smallest unit of work that can be scheduled to run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Library | A collection of assets that can be used in your Azure Pipelines. The Library contains two types of assets: Variable groups and Secure files. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Service connections | Enable connection to an external service required to execute tasks in a job. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Stages | Organize jobs within a pipeline. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Task groups | Encapsulate a sequence of tasks into a single reusable task. | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Tasks | The building blocks that define the steps that make up a pipeline job. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Templates | Define reusable content, logic, and parameters. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: | :::image type="icon" source="../../media/icons/delete-icon.png" border="false"::: |
Triggers | Define the event that causes a pipeline to run. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Variables | A placeholder for values that can be used throughout your pipeline's execution. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
Variable groups | Use to store values and secrets that you want to manage and share across multiple pipelines. | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc | :::image type="icon" source="../../media/icons/checkmark.png" border="false"::: doc |
::: moniker-end
[!div class="nextstepaction"] Sign up for Azure Pipelines Create your first pipeline Customize your pipeline