In this article, we will learn a new way of converting an existing Classic UI based pipeline into YAML pipeline.
Overview
Azure Pipelines
Azure pipelines help us in automating the build and many other validation processes in a non-developer machines so that we can improved the quality of the Build.
Below are two different was in which you can configure Build Pipelines
- Classic UI Pipelines
- YAML Pipelines
Initially, Azure DevOps has only the Classic UI based pipelines. It had the below disadvantages.
- Multiple engineers working on the same pipelines was not easy
- Maintaining the versions of the Pipelines was almost not possible
- Submitting the Pipelines changes to the superior for a review was not possible
- Reusability was possible to some extent. However, executing those reusable components based on some rules was not possible.
With the support of YAML based pipelines, all of the above limitations are no longer applicable. However, Classic UI based pipelines provides us an easy approach for quickly authoring the pipelines especially for beginner’s, the Classic UI editor was a nice tool to start authoring the pipelines.
When you start working with YAML, initially you might not find it easy to work with but slowly once you understand how to get the YAML code from various different places, you will start feeling comfortable with YAML based pipelines too.
In this article, we will learn how easy it is to convert a Classic UI Pipeline into YAML based pipelines without authoring them from scratch.
Let’s start by authoring a Pipeline using Classic UI editor.
Author a Class UI Pipeline
Below is a complex pipeline yet with simple tasks in it. As shown in the below screenshot, the below pipeline has two jobs with dependencies (Job2 is runs only after Job1 is complete).

Azure DevOps – Convert Classic to YAML Pipelines – Pipeline
Each of the Steps in the both the Jobs doesn’t do much except it outputs some steps using PowerShell.

Azure DevOps – Convert Classic to YAML Pipelines – Step
Also, you might have noticed that the PowerShell uses a variable named $(welcomemessage) which is present in the variables section as shown in the below screenshot.

Azure DevOps – Convert Classic to YAML Pipelines – Classic UI Variables
And, as shown in the below screenshot, Job2 has a dependency on Job1

Azure DevOps – Convert Classic to YAML Pipelines – Job Dependency
Now, with all these functionalities, if you would like to convert these Class UI-based pipelines, you have got a new option to download the complete YAML for the entire pipeline.
Let’s learn how to do it.
Convert Class UI Pipeline to YAML Pipeline
In this section, we will learn how to convert a Classic UI pipeline to a YAML based pipeline. Navigate to the definition of the Build Pipeline by clicking on the Pipeline name. Once you click on the Pipeline name, you will be taken to the Pipeline definition page as shown below

Azure DevOps – Convert Classic to YAML Pipelines – Classic UI Definition
Now, click on the three ellipses as shown in the above screenshot which opens up a context menu as shown below.











Join the conversation! Your thoughts help the community grow.