Skip to content

Commit 190eb64

Browse files
committed
Merged main into live
2 parents e68e913 + aa4dfb4 commit 190eb64

File tree

2 files changed

+34
-65
lines changed

2 files changed

+34
-65
lines changed
Lines changed: 33 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,79 @@
11
---
2-
title: Migrate from Classic to YAML pipelines
2+
title: Migrate your Classic pipeline to YAML
33
titleSuffix: Azure Pipelines
4-
description: How to migrate from Classic pipelines to YAML.
4+
description: Learn how to migrate from Classic pipelines to YAML.
55
ms.subservice: azure-devops-pipelines-migrate
66
ms.topic: quickstart
7-
ms.date: 07/01/2024
7+
ms.date: 06/26/2025
88
monikerRange: azure-devops
99
---
1010

1111
# Migrate your Classic pipeline to YAML
1212

1313
[!INCLUDE [version-eq-azure-devops](../../includes/version-eq-azure-devops.md)]
1414

15-
Get started with Azure Pipelines by converting your existing Classic pipeline to use YAML. With a YAML-based pipeline, you can implement your CI/CD strategy as code and see its history, compare versions, blame, annotate, and so on.
15+
Azure Pipelines lets you manage your CI/CD process as code, making it easier to track changes, compare versions, annotate, and more.
1616

17-
When you convert your Classic pipeline, the end product is two pipelines. You'll have one new YAML pipeline and a Classic pipeline that can be retired. Your Classic pipeline's run history remains in the Classic pipeline.
17+
When you convert a Classic pipeline, you’ll end up with two pipelines: a new YAML pipeline and the original Classic one, which can then be retired. Your Classic pipeline's run history remains in the Classic pipeline.
1818

1919
> [!NOTE]
20-
> You can only export a YAML file from an existing Classic pipeline created with the classic build designer. If you don't see the option to export to JSON or YAML, then your pipeline doesn't support exporting. Classic release pipelines don't have the export to YAML option. You can export a classic release pipeline by exporting each individual task.
20+
> You can only export a YAML file from a Classic pipeline created using the classic build designer. If you dont see an option to export to YAML or JSON, your pipeline likely doesnt support exporting. Classic release pipelines don’t support YAML export, you’ll need to export each task individually.
2121
2222
## Prerequisites
2323

24-
Make sure you have the following items before you begin.
25-
26-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
27-
- An active Azure DevOps organization. [Sign up for Azure Pipelines](../get-started/pipelines-sign-up.md).
28-
- A working pipeline that uses the Classic user interface (UI) editor.
29-
- A sample YAML pipeline file in your code. Create a sample YAML pipeline in the following section.
24+
| **Product** | **Requirements** |
25+
|--------------------|--------------------|
26+
| **Azure** | - An Azure account with an active [subscription](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
27+
| **Azure DevOps** | - An Azure DevOps [organization](../../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../../organizations/projects/create-project.md).<br> - Allow [Azure Artifacts Domain URLs and IP addresses](../../organizations/security/allow-list-ip-url.md) if your organization is using a firewall or a proxy server.<br> - A working Classic pipeline. |
3028

3129
## Create a sample YAML pipeline
3230

33-
Do the following steps to create a sample YAML pipeline, which you'll update later with your exported code from the Classic UI editor.
34-
35-
1. Sign in to your organization (```https://dev.azure.com/{yourorganization}```) and select your project.
36-
37-
2. Select **Pipelines**, and then **New pipeline**.
38-
39-
:::image type="content" source="media/pipelines-new-pipeline.png" alt-text="Two buttons to select for new pipeline creation.":::
31+
Follow these steps to create a starter YAML pipeline, which you’ll later update with code exported from the Classic UI editor:
4032

41-
3. Select the location for your source code as either **GitHub** or **Azure Repos Git**.
33+
1. Sign in to your organization, and navigate to your project.
4234

43-
:::image type="content" source="media/source-code-location.png" alt-text="List of possible selections for your source code.":::
35+
1. Select **Pipelines**, and then select **New pipeline**.
4436

45-
4. Select a repository.
37+
:::image type="content" source="media/pipelines-new-pipeline.png" alt-text="A screenshot displaying how to create a new pipeline.":::
4638

47-
:::image type="content" source="media/select-repository.png" alt-text="Page where you select a repository for your source code pipeline.":::
39+
1. Select your source code location either **GitHub** or **Azure Repos Git**, and then select your repository.
4840

49-
5. On the Configure your pipeline page, select **Starter pipeline**.
41+
:::image type="content" source="media/source-code-location.png" alt-text="A screenshot displaying source code locations.":::
5042

51-
:::image type="content" source="media/select-pipeline-template.png" alt-text="List of templates to choose from for configuring your new pipeline.":::
43+
1. On the **Configure your pipeline page**, select the **Starter pipeline**.
5244

53-
6. Select **Save and run**.
45+
:::image type="content" source="media/select-pipeline-template.png" alt-text="A screenshot displaying the available pipeline templates.":::
5446

55-
:::image type="content" source="media/save-run-new-yaml-pipeline.png" alt-text="Review page where you select Save and run.":::
47+
1. Select **Save and run**, and then enter your commit message. Select **Commit directly to the main branch**, and then select **Save and run** once more. This will start a new run and commit the yaml pipeline to your repository.
5648

57-
7. Enter your commit message, select **Commit directly to the main branch**, and then choose **Save and run** again. A new run starts and it's committed to the repository. Wait for the run to finish.
49+
:::image type="content" source="media/commit-save-run.png" alt-text="A screenshot displaying how to save and run a new yaml pipeline.":::
5850

59-
:::image type="content" source="media/commit-save-run.png" alt-text="Commit message to commit to the main branch, and then select Save and run button.":::
51+
## Export a Classic pipeline to YAML
6052

61-
## Export your Classic pipeline
62-
63-
1. Sign in to your Azure DevOps organization, and then go to your project.
53+
1. Sign in to your Azure DevOps organization, and navigate to your project.
6454

6555
1. Select **Pipelines** > **Pipelines**.
6656

67-
1. Select your Classic pipeline definition, select the ellipses icon, and then select **Export to YAML**. Make sure you're in the pipeline definition view, not a specific run, to see the **Export to YAML** option.
57+
1. Find your Classic pipeline, select the ellipses (...) next to it, and then select **Export to YAML**. Make sure you're in the pipeline definition view, not a specific run, to see the **Export to YAML** option.
6858

69-
:::image type="content" source="media/export-yaml.png" alt-text="Screenshot of context menu, to export your pipeline to YAML.":::
59+
:::image type="content" source="media/export-yaml.png" alt-text="A screenshot displaying how to export a Classic pipeline to YAML.":::
7060

7161
1. Open the downloaded YAML file in your code editor.
7262

73-
1. If your YAML pipeline includes variables defined in the Classic UI, define the variables again in your pipeline settings UI or in your YAML file. For more information, see [Define variables](../process/variables.md).
74-
75-
1. Review any `cron` schedules in your YAML file. By default, `cron` schedules in YAML are in UTC. In Classic pipelines, they are in the organization's timezone. For more information, see [Configure schedules for pipelines](../process/scheduled-triggers.md).
76-
77-
1. Use the Task Assistant to make any other changes to the YAML file. The Task Assistant is a pane on the right side of the screen, which helps you correctly create and modify YAML steps.
78-
79-
:::image type="content" source="media/task-assistant-yaml.png" alt-text="Configure your pipeline task with Task Assistant.":::
63+
1. If your Classic pipeline used variables defined in the Classic UI editor, you’ll need to redefine them either in the YAML file or in the pipeline settings. See [Define variables](../process/variables.md) for more details.
8064

81-
1. **Save and run** your pipeline.
65+
1. Review any `cron` schedules in your YAML file. YAML schedules use UTC by default, while Classic pipelines use your organization’s local time zone. See [Configure schedules for pipelines](../process/scheduled-triggers.md) for more details.
8266

83-
## Clean up resources
67+
1. Use the **Task Assistant** (the pane on the right side of the editor) to help you add or modify steps in your YAML file.
8468

85-
If you're not going to use this sample pipeline anymore, delete it from your project. Deletion is permanent and includes all builds and associated artifacts.
69+
:::image type="content" source="media/task-assistant-yaml.png" alt-text="A screenshot displaying how to configure pipeline tasks with the Task Assistant.":::
8670

87-
1. Select the ellipses (...) and select **Delete**.
71+
1. Select **Save and run** once you're done.
8872

89-
2. Enter the name of your pipeline to permanently delete it, and then select **Delete**.
73+
## Related content
9074

91-
## FAQ
92-
93-
### Is there a task in YAML pipelines to create work items when there's a build failure?
94-
95-
YAML pipelines don't have a [Create work item on failure setting](../build/options.md#create-a-work-item-on-failure) like classic build pipelines. You have a couple of options for creating this functionality yourself.
96-
- You can use a script or PowerShell task and call the [REST API](/rest/api/azure/devops/pipelines/).
97-
- You can use Azure CLI to call [az boards work-item create](/cli/azure/boards/work-item#az-boards-work-item-create) in your pipeline. [See an example](../customize-pipeline.md#create-work-item-on-failure) of using the CLI to create a bug on failure.
98-
99-
## Next steps
100-
101-
Learn about the feature differences between YAML and Classic pipelines.
102-
103-
> [!div class="nextstepaction"]
104-
> [Use Azure Pipelines](../get-started/pipelines-get-started.md#feature-availability)
105-
106-
## Related articles
75+
- [YAML vs Classic Pipelines](../get-started/pipelines-get-started.md#feature-availability)
10776

10877
- [Customize your pipeline](../customize-pipeline.md)
109-
- [Learn YAML pipeline editor basics](../get-started/yaml-pipeline-editor.md)
110-
- [Define approvals and checks](../release/approvals/approvals.md)
78+
79+
- [YAML pipeline editor](../get-started/yaml-pipeline-editor.md)

docs/pipelines/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@
720720
href: release/approvals/servicenow.md
721721
- name: Migrate
722722
items:
723-
- name: Migrate from Classic pipelines
723+
- name: Migrate Classic pipelines to YAML
724724
href: release/from-classic-pipelines.md
725725
- name: Migrate from Jenkins
726726
href: migrate/from-jenkins.md

0 commit comments

Comments
 (0)