Dec 31, 2024 azure

Transform Classic Pipelines to YAML in Azure DevOps

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:

I created learning_azure_devops project under my https://dev.azure.com/atahanceylan/.

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

New Pipeline – Use classic editor to create a pipeline without yaml.

I ran the newly created pipeline and finished successfully.

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

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

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

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

Now you can use yaml files in your pipelines.

SHARE NOW

Leave a Reply

Your email address will not be published. Required fields are marked *