{"id":14155422,"url":"https://github.com/f2calv/yamlizr","last_synced_at":"2026-04-01T21:14:09.458Z","repository":{"id":37983870,"uuid":"288231686","full_name":"f2calv/yamlizr","owner":"f2calv","description":"Azure DevOps Designer-to-YAML Pipeline CLI CodeGen Tool w/GitHub Actions Generation","archived":false,"fork":false,"pushed_at":"2024-04-29T04:34:13.000Z","size":81,"stargazers_count":63,"open_issues_count":7,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-29T05:32:18.243Z","etag":null,"topics":["azure-devops","azure-pipelines","build-definition","ci-cd","github-actions","pipelines-as-code","yaml-files","yaml-pipeline"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f2calv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-17T16:33:01.000Z","updated_at":"2024-06-22T15:15:04.306Z","dependencies_parsed_at":"2024-01-12T12:07:10.620Z","dependency_job_id":"7139acb1-dfd4-44d0-8d01-61ba56e7424b","html_url":"https://github.com/f2calv/yamlizr","commit_stats":{"total_commits":25,"total_committers":6,"mean_commits":4.166666666666667,"dds":0.64,"last_synced_commit":"c3d55478ac6b679db41ba6b7628b4be11b11b159"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2Fyamlizr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2Fyamlizr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2Fyamlizr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f2calv%2Fyamlizr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f2calv","download_url":"https://codeload.github.com/f2calv/yamlizr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143543,"owners_count":21054794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","azure-pipelines","build-definition","ci-cd","github-actions","pipelines-as-code","yaml-files","yaml-pipeline"],"created_at":"2024-08-17T08:03:06.309Z","updated_at":"2026-04-01T21:14:09.451Z","avatar_url":"https://github.com/f2calv.png","language":"C#","funding_links":[],"categories":["github-actions"],"sub_categories":[],"readme":"# Yamlizr - Azure DevOps Designer-to-YAML Pipeline Conversion Tool\n\n[cascap.yamlizr-badge]: https://img.shields.io/nuget/v/yamlizr?color=blue\n[cascap.yamlizr-url]: https://nuget.org/packages/yamlizr\n\n![CI](https://github.com/f2calv/yamlizr/actions/workflows/ci.yml/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/f2calv/yamlizr/badge.svg?branch=main)](https://coveralls.io/github/f2calv/yamlizr?branch=main) [![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=f2calv_yamlizr\u0026metric=code_smells)](https://sonarcloud.io/component_measures/metric/code_smells/list?id=f2calv_yamlizr) [![Nuget][cascap.yamlizr-badge]][cascap.yamlizr-url]\n\n\u003e This tool was created when there was no means of exporting a designer/classic build/release definition to YAML. As of November 2020 there is a new [Export to YAML](https://devblogs.microsoft.com/devops/replacing-view-yaml/) feature which allows you to export a _Build_ pipeline to YAML with a single click. This official function covers more edge cases than this CLI for Build pipelines. Where this CLI still has benefits is that it also converts Release definitions to YAML, which the official tool does not. It also allows the conversion of every single Build/Release definition en-masse, so much less clicking! Then you can then cut/copy/paste/manipulate the generated YAML steps as required to fit into a build and/or deployment pipeline unique to your own requirements.\n\n**yamlizr** is a [.NET Global Tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) which converts Azure DevOps Classic Designer Build/Release Definitions and any referenced Task Groups en-masse into their [YAML Pipeline](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops\u0026tabs=schema%2Cparameter-schema) or [GitHub Action](https://github.com/features/actions) equivalent.\n\nThe tool itself uses the [Azure DevOps .NET Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=azure-devops) to pre-cache relevant data from your Azure DevOps organisation/account. This data includes build/release definitions, task groups, tasks/extensions data and variable groups. This Azure DevOps data is converted into Azure DevOps Pipeline objects (stages/jobs/steps/variables) which are then persisted to YAML using the [YamlDotNet](https://github.com/aaubry/YamlDotNet) library.\n\nThis _is not_ a delicate tool to create perfectly constructed YAML pipelines. Instead consider it to be a blunt instrument which will spawn as many YAML files as possible and from this YAML you can pick/choose and copy/paste the relevant stages/jobs/steps/variables into your own preferred YAML CI/CD deployment architecture.\n\nAlso... there is an optional switch whereby the tool can pass the Azure DevOps Pipeline objects into the [AzurePipelinesToGitHubActionsConverter library](https://github.com/samsmithnz/AzurePipelinesToGitHubActionsConverter) (by [@samsmithnz](https://github.com/samsmithnz)) and export your pipelines as GitHub Actions compliant workflows.\n\n**Disclaimer**: _Do not consider any of the YAML generated by this tool to be 'production ready'. Do your own testing/research and [post any issues](https://github.com/f2calv/yamlizr/issues) and/or make a PR!_\n\nIf you find this tool of use then please give it a thumbs-up by giving this repository a :star: ... :wink:\n\n## Installation/Set-up\n\n- [Create a Personal Access Token (PAT)](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops\u0026tabs=preview-page) with the following scopes/permissions;\n\n  | Scope             | Permission    |\n  | ----------------- | ------------- |\n  | Build             | Read          |\n  | Deployment Groups | Read \u0026 Manage |\n  | Release           | Read          |\n  | Task Groups       | Read          |\n  | Variable Groups   | Read          |\n\n- Download and install either;\n  - [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)\n  - [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n- From a command line shell install the tool;\n  `dotnet tool update --global yamlizr`\n\n### CLI Operation\n\nTo generate YAML files in the `c:/temp/myoutputfolder` output folder execute the following command;\n\n```pwsh\nyamlizr generate -pat \u003cyour PAT here\u003e -org \u003cyour AzDO Organisation Uri\u003e -proj \u003cyour AzDO project name\u003e -out c:/temp/myoutputfolder\n```\n\nFor context-sensitive help execute;\n\n```powershell\nyamlizr --help\n```\n\nOptional arguments;\n\n- `--filter \u003csome string here\u003e` filter build/release definitions (if you want to use a more granular approach).\n- `--phasetype \u003cphase type here\u003e` filter deployment jobs by Deploy Phase Type the default is `AgentBasedDeployment` DeployPhaseTypes(tested), other (un-tested) options are `RunOnServer`, `MachineGroupBasedDeployment` \u0026 `DeploymentGates`.\n\nOptional switches;\n\n- `--inline` merge the tasks from task groups into the steps of the calling job instead of creating additional template files.\n- `--githubactions` generate GitHub Actions workflows via [AzurePipelinesToGitHubActionsConverter](https://github.com/samsmithnz/AzurePipelinesToGitHubActionsConverter).\n\nExamples;\n\n```powershell\n#generate both Azure Pipelines and GitHub Actions YAML for a Build Definition called 'wibble-CI' and a Release Definition called 'wibble-CD';\nyamlizr generate `\n  -pat \u003cyour PAT here\u003e `\n  -org \u003cyour AzDO Organisation Uri\u003e `\n  -proj \u003cyour AzDO project name\u003e `\n  -out c:/temp/myoutputfolder `\n  --filter wibble `\n  --githubactions\n\n#generate both Azure Pipelines and GitHub Actions YAML for *ALL* Build \u0026 Release Definitions found within the AzDO Project;\nyamlizr generate `\n  -pat abcdefghij01234567890abcdefghij01234567890abcdefghij `\n  -org https://dev.azure.com/MyOrg `\n  -proj MyProject `\n  -out c:/temp/myoutputfolder `\n  --githubactions\n```\n\nAll YAML files generated are output into sub-folders of a project folder, i.e. using the above example of `-o c:/temp/myoutputfolder` the following folders are created;\n\n- `c:/temp/myoutputfolder/\u003cyour AzDO project\u003e/AzureDevOpsBuilds/*.yml`\n- `c:/temp/myoutputfolder/\u003cyour AzDO project\u003e/AzureDevOpsReleases/*.yml`\n- `c:/temp/myoutputfolder/\u003cyour AzDO project\u003e/AzureDevOpsTaskGroups/*.yml`\n- `c:/temp/myoutputfolder/\u003cyour AzDO project\u003e/GitHubBuilds/*.yml`\n- `c:/temp/myoutputfolder/\u003cyour AzDO project\u003e/GitHubReleases/*.yml`\n\n### Core Dependencies\n\n- [Azure DevOps .NET Client Libraries](https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries?view=azure-devops)\n- [AzurePipelinesToGitHubActionsConverter](https://github.com/samsmithnz/AzurePipelinesToGitHubActionsConverter)\n- [YamlDotNet](https://github.com/aaubry/YamlDotNet)\n- [CommandLineUtils](https://github.com/natemcmaster/CommandLineUtils)\n- [ShellProgressBar](https://github.com/Mpdreamz/shellprogressbar)\n\n### Misc Tips\n\n- The [NuGet package](https://www.nuget.org/packages/yamlizr/) includes [SourceLink](https://github.com/dotnet/sourcelink) which enables you to jump inside the library and debug the API yourself. By default Visual Studio 2017/2019 does not allow this and will pop up an message \"You are debugging a Release build of...\", to disable this message go into the Visual Studio debugging options and un-check the 'Just My Code' option (menu path, Tools \u003e Options \u003e Debugging).\n\n### Known Issues\n\n- ShellProgressBar gives random formatting problems.\n- `--parallelism` command line option for faster processing is a bit buggy so disabled.\n- Various YAML structures are 'missing', PR's welcome.\n\n### Feedback/Issues\n\nPlease post any issues or feedback [to GitHub issues](https://github.com/f2calv/yamlizr/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff2calv%2Fyamlizr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff2calv%2Fyamlizr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff2calv%2Fyamlizr/lists"}