Files
importer-labs/azure_devops/valet-migrate-lab.md
T
dkalmin 38b63d3af5 Updating format and repo creation flow. (#3)
* Update readme.md

* Update readme.md

* Update readme.md

* Update devcontainer.json

* Update setupcodespace.sh

* Update valet-audit-lab.md

* Update valet-dry-run-lab.md

* Update valet-migrate-lab.md

* Update valet-migrate-custom-lab.md

* Update valet-audit-lab.md

* Update valet-audit-lab.md

* Update valet-dry-run-lab.md

* Update valet-migrate-lab.md

* Update valet-migrate-custom-lab.md

* Update valet-dry-run-lab.md

* Update valet-migrate-custom-lab.md
2022-06-29 10:28:06 -07:00

2.7 KiB

Migrate an Azure DevOps pipeline to GitHub Actions

In this lab, you will use the Valet migrate command to migrate an Azure DevOps pipeline to GitHub Actions. The migrate subcommand can be used to convert a pipeline to its GitHub Actions equivalent and then create a pull request with the contents.

Prerequisites

  1. Follow all steps here to set up your environment
  2. Create or start a codespace in this repository (if not started)
  3. Completed the Valet audit lab.

Identify the Azure DevOps pipeline ID to use

You will need a pipeline ID to perform the migration

  1. Go to the valet/ValetBootstrap/pipelines folder
  2. Open the valet/ValetBootstrap/pipelines/valet-pipeline1.config.json file
  3. Look for the web - href link
  4. At the end of the link is the pipeline ID. Copy or note the ID.

Example

Screen Shot 2022-05-10 at 8 50 06 AM

Perform a migration

You will use the codespace preconfigured in this repository to perform the migration.

  1. Navigate to the codespace Visual Studio Code terminal
  2. Verify you are in the valet directory
  3. Copy the following command and replace:
    • GITHUB-ORG with the name of your organization.
    • GITHUB-REPO with the name of your repository.
    • PIPELINE-ID with your pipeline ID.
  4. Now, from the ./valet folder in your repository, run valet migrate to migrate the pipeline to GitHub Actions.
cd valet
gh valet migrate azure-devops pipeline --target-url https://github.com/GITHUB-ORG/GITHUB-REPO --pipeline-id PIPELINE-ID --output-dir migrate

Example

valet-migrate-1

  1. Valet will create a pull request directly to your GitHub repository.
  2. Click the green pull request link in the output of the migrate command. See below.

Example

valet-migrate-5

View the pull request

The migrate output will show you the pull request on GitHub.

Example

migrate-pr

Next Lab

Migrate an Azure DevOps pipeline to GitHub Actions with a custom transformer