How to Batch Convert Azure Pipelines YAML to Github Actions YAML? - azure-devops

I have Azure YAML pipelines that have been created long back and I am now looking into migrating my existing devops solutions form Azure to Github Actions.
How do I approach migrating / translating existing pipelines from Azure DevOps to Github Actions?
Manually translating each ADO Pipeline is not something that would be consider a feasible solution for the number of pipelines I have.
Reference Links:
Azure DevOps Pipelines: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/?view=azure-pipelines
Github Actions: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
Simply put: I need to convert my existing ADO pipelines to Github Actions
I am thinking of building a tool to serve this purpose of converting Azure DevOps pipelines to Github Actions but need ideas on how to approach this problem.

From Leo Liu's answer, May 2022:
I am afraid there is no such out of box extension or tool to batch Convert Azure Pipelines YAML to Github Actions YAML at this moment.
Update:
Introducing GitHub Actions Importer (Nov. 2022)
We’ve launched a public preview of GitHub Actions Importer, which helps you forecast, plan, and automate migrations from your current CI/CD tool to GitHub Actions.
Doing individual migrations is relatively easy in isolation.
However, for those that have a large and established CI/CD footprint, having tooling available to assist with migrations is key to their ability to adopt Actions at scale.
In the time that we’ve been developing and using GitHub Actions Importer in its private preview form, we’ve encountered numerous customers that have thousands of pipelines—even in excess of 15K—in their legacy environments that need to be migrated.
GitHub Actions Importer is designed to help when manual migration is not feasible, such as when users have a large number of teams that depend on hundreds or thousands of workflows.
To learn more, see Automating migrations with GitHub Actions Importer and the announcement post on the GitHub blog.
Sign up here to request access to the public preview.
So check it out: it does list Azure DevOps in its Supported CI platforms.

How to Batch Convert Azure Pipelines YAML to Github Actions YAML?
I am afraid there is no such out of box extension or tool to batch Convert Azure Pipelines YAML to Github Actions YAML at this moment.
There is a tool to make migrations between Azure Pipelines YAML and GitHub Actions YAML easier for one YAML file at a time:
Convert Azure Pipelines YAML to GitHub Actions YAML
But the tool for batch convert doesn't seem to exist yet.

Related

How do I show multiple Azure Pipeline pipelines in GitHub?

We use Azure DevOps for our CI/CD pipelines, but our repositories are in GitHub. We currently trigger the CI pipelines on each push, but there is no link to GitHub so we lose easily seeing the status of a build in pull requests / automatically failing a check if a build fails.
Azure Pipelines has an app on GitHub Marketplace for integrating pipelines with repositories / pull requests. I installed this in our GitHub organization and configured it with the repository access it needs, which then had me authenticate with Azure DevOps, select the project and the pipeline yaml associated with the repository.
This works great and I can see the status directly in a pull request -
The issue is that I have multiple pipelines I would like to run and display the status of in the pull request. We have a monorepo but I only want to build an app if it was modified, so I utilize path filters in the Azure Pipelines yaml so the CI is only run when I need it to. GitHub does not discover/display the status of other CI pipelines I have in the project.
Initially, I tried just setting up another azure pipelines yaml that is triggered by pull requests. When I make a pull request, I see in Azure Pipelines the CI was triggered by 'PR automated for {pr number}', but it does not display it's status in GitHub.
I ended up going to the Azure Pipelines app settings in GitHub, 'revoking' access to the repository, and then immediately re-configuring it with access to the same project as before, but selecting a different pipeline yaml. This worked, it retained the first build I configured and added the second, and now multiple builds are shown in the pull request -
But this does not seem like the intended way to accomplish this. The GitHub app links to the entire documentation for Azure Pipelines, not specifically to docs about the app, and I have not been able to find any info within on how to do this.
Is there a way to add multiple pipelines with the Azure Pipelines app on GitHub, outside of this workaround?

Using Jira as Board and Azure Devops as CI/CD

Have you ever tried to use Jira as development board and Azure DevOps as repository + CI/CD Pipelines?
I was wondering if it is possible to link to Jira tasks the results of Azure pipelines deployments and builds, i found this plugin but reviews say is not working properly recently.
EDIT
Using the mentioned plugins seems the right way although they are not working properly at the moment. I will try to contact the support as suggested.
According to your description, you can try to use the plugin for Azure DevOps.
Then you can use the flow: Jira -> GitHub -> Azure Pipelines CI -> Azure Pipelines CD.
For more information, you could refer to the Azure Pipelines integration with Jira Software.

Rename "Pipelines" to "Builds" in ADO

How do I customize the "Pipeline" tab in Azure Devps (Image 1) so that it is renamed to "Builds" (Image 2)?
Rename “Pipelines” to “Builds” in ADO
Sorry for any inconvenience.
This behavior is by designed and is not an issue. There is no way to fix it at present.
Azure devops team working on an updated user experience to manage our pipelines. These updates make the pipelines experience modern and consistent with the direction of Azure DevOps.
Moreover, these updates bring together classic build pipelines and multi-stage YAML pipelines into a single experience. It is mobile-friendly and brings various improvements to how you manage your pipelines.
You could check the document Azure DevOps Pipelines – Multi-Stage Pipelines and YAML for Continuous Delivery for some more details.
Since Multi-Stage Pipelines and YAML for Continuous Delivery introduced, Builds are no longer just a single build as before, but also include the CD part. At this time, Builds are no longer suitable as tabs, so they are changed to Pipelines.
This is a modification of product update progress.

Deploy to Azure Extension - Only Allows Creation of Github Actions Workflow. Wont Allow GitHub + Azure Pipelines Flow Creation

I am following the steps outlined here. I am using the Deploy to Azure Extension
https://learn.microsoft.com/en-us/azure/devops/pipelines/targets/deploy-to-azure-vscode?view=azure-devops#github--azure-pipelines
I have done the following steps.
I have managed to create a simple react app and then got the GitHub + GitHub Actions portion to work no problem.
Now, I want to get GitHub Plus Azure Pipeline to work. So, I deleted the GitHub Actions/Workflow files, and starting over with the CICD setup.
Next, I have enabled Use Azure Pipelines for GitHub in the extension.
Then, as per the steps/pictures outlined in the above microsoft documentation link, I have begun the configure CICD option from the command palette.
Selected the Visual Studio Subscription
Selected the target web app
Now, at this point, as per the linked tutorial, it is supposed to ask me to choose a azure devops organization, so that the azure pipeline YAML file can kick in. This step never happens.
instead, VS Code will proceed to generate a GitHub Actions Workflow just as it did before.
What should I do to the GitHub to Azure Pipeline working from this extension?
Update 1
In case anyone is curious, I have raised a issue on the visual studio community forum. You can find that here
https://developercommunity.visualstudio.com/content/problem/1182952/github-azure-pipelines-falls-back-to-github-github.html
As of now, there is an ongoing discussion but no solution yet.
You can try reinstalling Deploy to Azure Extension and enable Use Azure Pipelines for GitHub, and then configure CI/CD option again. If the issue persists, you can report this issue here.
You can create a pipeline directly in your azure devops project. Check out below tutorial
Build, test, and deploy JavaScript and Node.js apps
You will also need to create an Azure Resource Manager service connection to deploy to your azure resource from azure devops pipeline.
Deploy an Azure Web App (Linux)

Maintaining build and deployment history in azure devops

How can we maintain build and deployment history if we are planning to migrate the yml pipelines from one project to another in Azure DevOps?
How can we maintain build and deployment history if we are planning to migrate the yml pipelines from one project to another in Azure DevOps?
I am afraid there is no such way to do this at this moment.
Currently, we can only export and import pipeline for the classic editor. For the yml pipelines, we could only copy the yml file to another repo. But neither classic editor nor yml can transplant history records.
You could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps.