Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 2.59 KB

File metadata and controls

49 lines (31 loc) · 2.59 KB

DOCKER - Azure DevOps To GitHub Repository Migrator

This is the containerized version of the migrator. It uses the migrate-mirror.ps1 script.

Usage

Use the public image

The easiest way to use this migration utility is to consume the public image on Docker Hub: n3wt0n/azdo2ghrepomigrator

docker pull n3wt0n/azdo2ghrepomigrator

To launch the container, you can use the following command:

docker run -it -e "AZDOPAT=xxx" -e "AZDOORG=xxx" -e "AZDOPRJ=xxx" -e "AZDOREPO=xxx" -e "GHPAT=xxx" -e "GHUSER=xxx" -e "GHREPO=xxx" n3wt0n/azdo2ghrepomigrator

See the 'Required Environment Variables'section below to know more about the Environment Variables you need to use.

Create your own container image

If you instead prefer creating your own container image, follow these steps:

  1. Download or clone the whole repo
  2. Go to the "Docker" folder
  3. Launch the "buildImage.bat" or the "buildImage.sh" script to invoke the docker build command

If you prefer using the command manually against the Dockerfile make sure you are executing it on the root of the repo

Required Environment Variables

The container needs the following environment variables (and values) to run.

  • AZDOPAT: PAT (Personal Access Token) in Azure DevOps with the Code > Read permissions granted
  • AZDOORG: name of the Azure DevOps Organization where your source repository resides (the XXX in dev.azure.com/XXX or XXX.visualstudio.com)
  • AZDOPRJ: name of the Azure DevOps Team Project where the source repository resides
  • AZDOREPO: name of the Azure DevOps Source Repository to migrate
  • GHPAT: PAT (Personal Access Token) in GitHub with the repo (Full control) permmissions granted
  • GHUSER: GitHub Username or (Organization) with which you have created the destination repository
  • GHREPO: name of the GitHub Destination Repository

For instruction on how to generate a PAT in Azure DevOps, take a look at the official documentation here

For instruction on how to generate a PAT in GitHub, take a look at the official documentation here

Please note that the Destination Repo must be empty and not be initialized.