Files
importer-labs/azure_devops/3-dry-run.md
T
2022-09-07 08:32:34 -07:00

2.2 KiB

Dry run the migration of an Azure DevOps pipeline to GitHub Actions

In this lab, you will use the valet dry-run command to convert an Azure DevOps pipeline to it's equivalent GitHub Actions workflow and write the workflow to your local filesystem.

Prerequisites

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

Identify the Azure DevOps pipeline ID to use

You will need a pipeline ID to perform the dry run

  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

valet-dr-5

Perform a dry run

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

  1. Navigate to the codespace Visual Studio Code terminal
  2. Verify you are in the valet directory
gh valet dry-run azure-devops pipeline --pipeline-id PIPELINE-ID --output-dir dry-run
  1. Now, from the valet folder in your repository, run gh valet dry-run to see the output:

Example

valet-dr-1

  1. Valet will create a folder called dry-runs under the valet folder that shows what will be migrated.

Example

valet-dr-2

View dry-run output

The dry-run output will show you the GitHub Actions yml that will be migrated to GitHub.

Example

valet-dr-3

Next Lab

Migrate an Azure DevOps pipeline to GitHub Actions