|
1 | 1 | --- |
2 | | -title: Migrate from Classic to YAML pipelines |
| 2 | +title: Migrate your Classic pipeline to YAML |
3 | 3 | titleSuffix: Azure Pipelines |
4 | | -description: How to migrate from Classic pipelines to YAML. |
| 4 | +description: Learn how to migrate from Classic pipelines to YAML. |
5 | 5 | ms.subservice: azure-devops-pipelines-migrate |
6 | 6 | ms.topic: quickstart |
7 | | -ms.date: 07/01/2024 |
| 7 | +ms.date: 06/26/2025 |
8 | 8 | monikerRange: azure-devops |
9 | 9 | --- |
10 | 10 |
|
11 | 11 | # Migrate your Classic pipeline to YAML |
12 | 12 |
|
13 | 13 | [!INCLUDE [version-eq-azure-devops](../../includes/version-eq-azure-devops.md)] |
14 | 14 |
|
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. |
16 | 16 |
|
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. |
18 | 18 |
|
19 | 19 | > [!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 don’t see an option to export to YAML or JSON, your pipeline likely doesn’t support exporting. Classic release pipelines don’t support YAML export, you’ll need to export each task individually. |
21 | 21 |
|
22 | 22 | ## Prerequisites |
23 | 23 |
|
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. | |
30 | 28 |
|
31 | 29 | ## Create a sample YAML pipeline |
32 | 30 |
|
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."::: |
40 | | - |
41 | | -3. Select the location for your source code as either **GitHub** or **Azure Repos Git**. |
| 31 | +Follow these steps to create a starter YAML pipeline, which you’ll later update with code exported from the Classic UI editor: |
42 | 32 |
|
43 | | - :::image type="content" source="media/source-code-location.png" alt-text="List of possible selections for your source code."::: |
| 33 | +1. Sign in to your organization, and navigate to your project. |
44 | 34 |
|
45 | | -4. Select a repository. |
| 35 | +1. Select **Pipelines**, and then select **New pipeline**. |
46 | 36 |
|
47 | | - :::image type="content" source="media/select-repository.png" alt-text="Page where you select a repository for your source code pipeline."::: |
| 37 | + :::image type="content" source="media/pipelines-new-pipeline.png" alt-text="A screenshot displaying how to create a new pipeline."::: |
48 | 38 |
|
49 | | -5. On the Configure your pipeline page, select **Starter pipeline**. |
| 39 | +1. Select your source code location either **GitHub** or **Azure Repos Git**, and then select your repository. |
50 | 40 |
|
51 | | - :::image type="content" source="media/select-pipeline-template.png" alt-text="List of templates to choose from for configuring your new pipeline."::: |
| 41 | + :::image type="content" source="media/source-code-location.png" alt-text="A screenshot displaying source code locations."::: |
52 | 42 |
|
53 | | -6. Select **Save and run**. |
| 43 | +1. On the **Configure your pipeline page**, select the **Starter pipeline**. |
54 | 44 |
|
55 | | - :::image type="content" source="media/save-run-new-yaml-pipeline.png" alt-text="Review page where you select Save and run."::: |
| 45 | + :::image type="content" source="media/select-pipeline-template.png" alt-text="A screenshot displaying the available pipeline templates."::: |
56 | 46 |
|
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. |
| 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. |
58 | 48 |
|
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."::: |
| 49 | + :::image type="content" source="media/commit-save-run.png" alt-text="A screenshot displaying how to save and run a new yaml pipeline."::: |
60 | 50 |
|
61 | 51 | ## Export your Classic pipeline |
62 | 52 |
|
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. |
64 | 54 |
|
65 | 55 | 1. Select **Pipelines** > **Pipelines**. |
66 | 56 |
|
|
0 commit comments