All Projects → f2calv → yamlizr

f2calv / yamlizr

Licence: MIT License
Azure DevOps Designer-to-YAML Pipeline CLI CodeGen Tool

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to yamlizr

devops-governance
Example end-to-end Governance Model from CI/CD to Azure Resource Manager. Use this project to deploy example AAD, ARM and Azure DevOps resources to learn about e2e RBAC.
Stars: ✭ 79 (+243.48%)
Mutual labels:  ci-cd, azure-devops, azure-pipelines
azure-flutter-tasks
Easily build and deploy with latest Flutter build tasks for Azure DevOps Pipelines Tasks
Stars: ✭ 66 (+186.96%)
Mutual labels:  ci-cd, azure-devops, azure-pipelines
PSRule-pipelines
Validate infrastructure as code (IaC) and DevOps repositories using Azure Pipelines.
Stars: ✭ 16 (-30.43%)
Mutual labels:  azure-devops, azure-pipelines
ParallelTestingSample-dotnet-core
Sample for running dotnet core tests in parallel across multiple agents in Azure DevOps
Stars: ✭ 19 (-17.39%)
Mutual labels:  azure-devops, azure-pipelines
azure-devops-terraform
Recipe to deploy Azure Infrastructure with Terraform via Azure DevOps
Stars: ✭ 18 (-21.74%)
Mutual labels:  azure-devops, azure-pipelines
azure-pipelines-lighthouse
Embed Google Lighthouse HTML reports into Azure Pipelines
Stars: ✭ 37 (+60.87%)
Mutual labels:  azure-devops, azure-pipelines
pulumi-az-pipelines-task
Azure Pipelines task extension for running Pulumi apps.
Stars: ✭ 19 (-17.39%)
Mutual labels:  azure-devops, azure-pipelines
jmeter-aci-terraform
Scalable cloud load/stress testing pipeline solution with Apache JMeter and Terraform to dynamically provision and destroy the required infrastructure on Azure.
Stars: ✭ 114 (+395.65%)
Mutual labels:  azure-devops, azure-pipelines
XamarinPipelineDemo
Demo and explanation on how to do several common tasks for Xamarin.Forms Android in an Azure DevOps pipeline on a Microsoft-hosted agent. Tasks include: build-based version, APK signing, publishing artifacts, unit tests, and UI tests (both via emulator in Azure DevOps and via real devices in App Center).
Stars: ✭ 23 (+0%)
Mutual labels:  azure-devops, azure-pipelines
vsts-publish-adf
This extension adds Azure Data Factory release tasks to Azure Pipelines.
Stars: ✭ 23 (+0%)
Mutual labels:  azure-devops, azure-pipelines
VstsExtensions
Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
Stars: ✭ 42 (+82.61%)
Mutual labels:  azure-devops, azure-pipelines
azure-pipelines-tfvc-tasks
Azure Pipelines tasks for Team Foundation Version Control
Stars: ✭ 26 (+13.04%)
Mutual labels:  azure-devops, azure-pipelines
AzureDevOpsPipelines-Templates
This project shows how to use YAML templates in Azure DevOps Pipelines.
Stars: ✭ 35 (+52.17%)
Mutual labels:  ci-cd, azure-devops
vsts-mirror-git-repository
A straightforward utility to mirror one Git repository to another location
Stars: ✭ 22 (-4.35%)
Mutual labels:  azure-devops, azure-pipelines
Not-a-Dog-Workshop
Workshop to build an automatic Not a Dog application , using the Serverless Azure Functions and Cognitive Services
Stars: ✭ 15 (-34.78%)
Mutual labels:  ci-cd, azure-devops
cake-vso
Cake integration for Azure DevOps.
Stars: ✭ 19 (-17.39%)
Mutual labels:  azure-devops, azure-pipelines
VSTSExtension-ActivePullRequests
An extension for Azure DevOps that provides a better view of active Pull Requests in a project.
Stars: ✭ 30 (+30.43%)
Mutual labels:  azure-devops
cake-build
Demonstrates a basic build of a .NET NuGet package using https://cakebuild.net/
Stars: ✭ 22 (-4.35%)
Mutual labels:  azure-devops
CSEDevOps
Azure DevOps extensions from CSE DevOps team
Stars: ✭ 18 (-21.74%)
Mutual labels:  azure-devops
readme-to-dockerhub
Small hack to push the readme to docker hub
Stars: ✭ 16 (-30.43%)
Mutual labels:  ci-cd

Yamlizr - Azure DevOps Designer-to-YAML Pipeline Conversion Tool

CI Coverage Status SonarCloud Coverage Nuget

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 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.

yamlizr is a .NET Core 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.

The tool itself uses the Azure DevOps .NET Client Libraries 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 library.

This is not a delicate tool to create perfectly constructed YAML pipelines. Instead consider it to be a hammer 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.

Also... there is an optional switch whereby the tool can pass the Azure DevOps Pipeline objects into the AzurePipelinesToGitHubActionsConverter library (by @samsmithnz) and export your pipelines as GitHub Actions YAML.

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 and/or make a PR!

Installation/Set-up

  • Create a Personal Access Token (PAT) with the following scopes/permissions;
    Scope Permission
    Build Read
    Deployment Groups Read & Manage
    Release Read
    Task Groups Read
    Variable Groups Read
  • Download and install either .NET Core 3.1 SDK or .NET 5.0 SDK.
  • From a command line shell install the tool; dotnet tool update --global yamlizr

CLI Operation

To generate YAML files in the c:/temp/myoutputfolder output folder execute the following command;

yamlizr generate -pat <your PAT here> -org <your AzDO organisation> -proj <your AzDO project> -out c:/temp/myoutputfolder

For context-sensitive help execute;

yamlizr --help

Optional switches;

  • --inline merge the tasks from task groups into the steps of the calling job instead of creating additional template files.
  • --githubactions generate GitHub Actions workflows via AzurePipelinesToGitHubActionsConverter.
  • --filter filter build/release definitions (if you want to use a more granular approach).

To generate both Azure Pipelines and GitHub Actions YAML for a build definition called 'wibble-CI' and a release definition called 'wibble-CD';

yamlizr generate -pat <your PAT here> -org <your AzDO organisation> -proj <your AzDO project> -out c:/temp/myoutputfolder --filter wibble --githubactions

All 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;

  • c:/temp/myoutputfolder/<your AzDO project>/AzureDevOpsBuilds/*.yml
  • c:/temp/myoutputfolder/<your AzDO project>/AzureDevOpsReleases/*.yml
  • c:/temp/myoutputfolder/<your AzDO project>/AzureDevOpsTaskGroups/*.yml
  • c:/temp/myoutputfolder/<your AzDO project>/GitHubBuilds/*.yml
  • c:/temp/myoutputfolder/<your AzDO project>/GitHubReleases/*.yml

Core Dependencies

Misc Tips

  • The NuGet package includes 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 > Options > Debugging).

Known Issues

  • ShellProgressBar gives random formatting problems.
  • --parallelism command line option for faster processing is a bit buggy so disabled.
  • Various YAML structures are 'missing', PR's welcome.

Feedback/Issues

Please post any issues or feedback here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].