Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 2.94 KB

6-migrate.md

File metadata and controls

59 lines (38 loc) · 2.94 KB

Perform a production migration of an Azure DevOps pipeline

In this lab, you will use the migrate command to convert an Azure DevOps pipeline and open a pull request with the equivalent Actions workflow.

Prerequisites

  1. Followed the steps here to set up your GitHub Codespaces environment and bootstrap an Azure DevOps project.
  2. Completed the configure lab.
  3. Completed the dry-run lab.

Performing a migration

Answer the following questions before running a migrate command:

  1. What is the ID of the pipeline to convert?
  2. Where do you want to store the logs?
    • tmp/migrate
  3. What is the URL for the GitHub repository to add the workflow to?

Steps

  1. Run the following migrate command in the codespace terminal:

    gh actions-importer migrate azure-devops pipeline --pipeline-id :pipeline_id --target-url https://github.com/:owner/:repo --output-dir tmp/migrate
  2. The command will write the URL to the pull request that is created when the command succeeds.

    $ gh actions-importer migrate azure-devops pipeline --pipeline-id 8 --target-url https://github.com/ethanis/labs --output-dir tmp/migrate
    [2022-09-07 20:25:08] Logs: 'tmp/dry-run/log/actions-importer-20220907-202508.log'
    [2022-09-07 20:25:13] Pull request: 'https://github.com/ethanis/labs/pull/42'
  3. Open the generated pull request in a new browser tab.

Inspect the pull request

The first thing to notice about the pull request is that there is a list of manual steps to complete:

img

Next, you can inspect the Files changed in this pull request to see the converted workflow that is being added. Any additional changes or code reviews that were needed should be done in this pull request.

Finally, you can merge the pull request once your review has completed. You can then view the workflow running by selecting the Actions menu in the top navigation bar in GitHub.

img

At this point, the migration has completed and you have successfully migrated an Azure DevOps pipeline to Actions.

Next lab

This concludes all labs for migrating Azure DevOps pipelines to Actions with GitHub Actions Importer.