DEV Community

Cover image for Azure Devops Converting Classic Pipelines to Yaml Based Pipeline
Atahan C.
Atahan C.

Posted on

Azure Devops Converting Classic Pipelines to Yaml Based Pipeline

In this tutorial blog post, I will mention about how to transform old build, release classic pipelines to yaml based pipelines. Classic Pipeline is GUI based pipeline creator that you use drag and drop pipeline steps. In old versions of these pipelines you don’t have view as yaml option. So, you need to transform this GUI based pipelines to yaml pipelines.
Prerequisites:

Azure Devops Organizations]

I created a classic pipeline with WinampToSpotifyClassicPipeline from my Github WinampToSpotifyWeb repository.

Use the classic editor to create a pipeline without YAML.

Classic Pipeline GUI

I ran the newly created pipeline and finished successfully.

Successful pipeline run
Now we need to use yamlizr tool for transformation. yamlizr is a .NET Global Tool which converts Azure DevOps Classic Designer Build/Release Definitions and any referenced Task Groups en-masse into their YAML Pipeline or GitHub Action equivalent.
Installation/Set-up
1-) We need to create a Personal Access Token from Azure Devops Settings with following scopes:
Build - Read , Deployment Groups - Read & Manage, Release – Read, Task Groups - Read, Variable Groups - Read
Personal Access Token

Personal Access Token Scopes

2-) Download and install either;
.NET 8.0 SDK
.NET 9.0 SDK
3-) From a command line shell install the tool;
dotnet tool update --global yamlizr

Dotnet tool update globally

4-) CLI Operation
To generate YAML files in the c:/temp/myoutputfolder output folder execute the following command;
yamlizr generate -pat your personal access token -org https://dev.azure.com/atahanceylan/ -proj
learning_azure_devops -out c:/temp/myoutputfolder

Yamlzr cli code run output

We can see created yaml files under C:\Temp\myoutputfolder folder.

output folder

build pipeline yaml

release pipeline output

Now you can use yaml files in your pipelines.

Top comments (0)