Skip to content

Instantly share code, notes, and snippets.

@AAugustine
Last active October 13, 2021 21:13
Show Gist options
  • Select an option

  • Save AAugustine/e52dcd36e8725805993eadb266d1edc3 to your computer and use it in GitHub Desktop.

Select an option

Save AAugustine/e52dcd36e8725805993eadb266d1edc3 to your computer and use it in GitHub Desktop.
Using Azure DevOps with GitHub

A Guide to Using Azure DevOps with GitHub

Background

Azure DevOps provides developers with a platform that supports collaboration across the entire software development lifecycle. GitHub is the home for all developers, and provides not only a best-in-class source code management platform, but also many exciting new capabilities like GitHub Actions, GitHub Packages, and GitHub Advanced Security.

Using a GitHub repository as the source code repository with an Azure DevOps project provides developers with the capabilities and advantages of both Azure DevOps and GitHub.

Whether you are starting with a new project, or migrating your repository from Azure Repos to GitHub and looking to connect it back to your existing Azure DevOps project, the process can be quite simple and straightforward, with first-class support for Azure DevOps + GitHub integration from both the Azure DevOps and GitHub platforms.

Pre-requisites

You will need a GitHub.com account and an Azure DevOps account to get started. If you do not have an existing Azure DevOps account, you can sign in to Azure DevOps using your GitHub.com account as well

If you need to create accounts for these services, please visit these links

Starting a new Azure DevOps project with a GitHub repository

If you are creating a new Azure DevOps project, you can start using a GitHub repository for hosting your project's code right from the start.

You can follow this link for a guide on how to create a new Azure DevOps project but when you get to the "Add a repository to your project" step, you can stop there and instad follow these instructions to create a GitHub repository and then connect the GitHub Repository to your Azure Boards Project Once you have this connection set up, you will want to make sure that you link your GitHub Items in Azure Boards

Here is a video showing how to connect Azure Boards to GitHub repos

If you are looking to create a CICD pipeline for your new project with a connected GitHub repo, we encourage you to start with GitHub Actions

Moving an Azure Repo to a GitHub repository for an existing project

Moving the repo to GitHub

Existing Azure DevOps Project

If you have an existing Azure DevOps project, with Azure Boards that you are already using for your collaboration planning & tracking and Azure Repos that you are using to store and version your project code, moving your Azure Repos to GitHub is also quite simple.

Connecting the GitHub repository to Azure Boards

Once you push your repository to GitHub you can connect the GitHub Repository to your Azure Boards Project and link your GitHub Items to work items in Azure Boards

You can now optionally delete your Azure Repo from your project

Using Azure Pipelines with GitHub

If you have Azure Pipelines that were connected to your existing Azure Repo that you migrated to GitHub, you can now connect your Azure Pipeline to the GitHub repository

However, we recommend that you explore migrating your Azure Pipelines builds to GitHub Actions

The pipeline syntax and concepts are very similar, and you can use the Actions built by vendors and the community as well as building your own

You can use this conversion utility to turn your Pipelines files to Actions workflows

Azure DevOps Project with GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment