From 070bd720d240921453cf19ff268b5190c5c51d1f Mon Sep 17 00:00:00 2001 From: j-dunham Date: Tue, 13 Sep 2022 09:48:15 -0400 Subject: [PATCH 1/3] Create 5-migrate.md --- circle_ci/5-migrate.md | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 circle_ci/5-migrate.md diff --git a/circle_ci/5-migrate.md b/circle_ci/5-migrate.md new file mode 100644 index 0000000..e1b159a --- /dev/null +++ b/circle_ci/5-migrate.md @@ -0,0 +1,53 @@ +# Perform a production migration of a CircleCI pipeline + +In this lab, you will use the `migrate` command to convert a CircleCI pipeline and open a pull request with the equivalent Actions workflow. + +## Prerequisites + +1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your GitHub Codespaces environment. +2. Completed the [configure lab](./1-configure-lab.md#configuring-credentials). +3. Completed the [dry-run lab](./3-dry-run.md). +4. Completed the [custom transformers lab](./4-custom-transformers.md). + +## Performing a migration + +Answer the following questions before running a `migrate` command: + +1. What project do you want to migrate? + - __circleci-hello-world__ +2. What is the namespace for that project? + - __Valet__ +3. Where do you want to store the logs? + - __./tmp/migrate__ +4. What is the URL for the GitHub repository to add the workflow to? + - __this repository__. The URL should should follow the pattern with `:owner` and `:repo` replaced with your values. + +### Steps + +1. Run the following `migrate` command in the codespace terminal: + + ```bash + gh valet migrate gitlab --target-url https://github.com/:owner/:repo --output-dir ./tmp/migrate --circle-ci-project circleci-hello-world + ``` + +2. The command will write the URL to the pull request that was created when the command succeeds. + + ADD_SCREENSHOT_HERE + +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. + +Next, you can inspect the "Files changed" in this pull request and 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. + +ADD_SCREENSHOT_HERE + +At this point, the migration has completed and you have successfully migrated a CircleCI pipeline to Actions! + +### Next Lab + +[Forecast potential build runner usage](6-forecast.md) From 7469d8565ce21bf63c08fe412bb5c7d81c0115b0 Mon Sep 17 00:00:00 2001 From: j-dunham Date: Tue, 13 Sep 2022 10:13:10 -0400 Subject: [PATCH 2/3] Update 5-migrate.md --- circle_ci/5-migrate.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/circle_ci/5-migrate.md b/circle_ci/5-migrate.md index e1b159a..d9ad85f 100644 --- a/circle_ci/5-migrate.md +++ b/circle_ci/5-migrate.md @@ -5,7 +5,7 @@ In this lab, you will use the `migrate` command to convert a CircleCI pipeline a ## Prerequisites 1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your GitHub Codespaces environment. -2. Completed the [configure lab](./1-configure-lab.md#configuring-credentials). +2. Completed the [configure lab](./1-configure.md#configuring-credentials). 3. Completed the [dry-run lab](./3-dry-run.md). 4. Completed the [custom transformers lab](./4-custom-transformers.md). @@ -15,11 +15,9 @@ Answer the following questions before running a `migrate` command: 1. What project do you want to migrate? - __circleci-hello-world__ -2. What is the namespace for that project? - - __Valet__ -3. Where do you want to store the logs? +2. Where do you want to store the logs? - __./tmp/migrate__ -4. What is the URL for the GitHub repository to add the workflow to? +3. What is the URL for the GitHub repository to add the workflow to? - __this repository__. The URL should should follow the pattern with `:owner` and `:repo` replaced with your values. ### Steps @@ -32,7 +30,7 @@ Answer the following questions before running a `migrate` command: 2. The command will write the URL to the pull request that was created when the command succeeds. - ADD_SCREENSHOT_HERE + ![pr](https://user-images.githubusercontent.com/18723510/189923353-1166bd94-8d64-4924-ac55-3e06fa5d1734.png) 3. Open the generated pull request in a new browser tab. @@ -42,9 +40,12 @@ The first thing to notice about the pull request is that there is a list of manu Next, you can inspect the "Files changed" in this pull request and see the converted workflow that is being added. Any additional changes or code reviews that were needed should be done in this pull request. +![action-run](https://user-images.githubusercontent.com/18723510/189924238-9f6799c7-e029-4695-a1de-a23666171992.png) + 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. - -ADD_SCREENSHOT_HERE + + + At this point, the migration has completed and you have successfully migrated a CircleCI pipeline to Actions! From b228150fffea19c922787e730c384a3c279c39f7 Mon Sep 17 00:00:00 2001 From: j-dunham Date: Tue, 13 Sep 2022 10:24:20 -0400 Subject: [PATCH 3/3] Update 5-migrate.md --- circle_ci/5-migrate.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/circle_ci/5-migrate.md b/circle_ci/5-migrate.md index d9ad85f..e8c1f09 100644 --- a/circle_ci/5-migrate.md +++ b/circle_ci/5-migrate.md @@ -18,14 +18,14 @@ Answer the following questions before running a `migrate` command: 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? - - __this repository__. The URL should should follow the pattern with `:owner` and `:repo` replaced with your values. + - __this repository__. The URL should follow the pattern with `:owner` and `:repo` replaced with your values. ### Steps -1. Run the following `migrate` command in the codespace terminal: +1. Run the following `migrate` command in the codespace terminal. Ensure the values in `--target-url` for `:owner` and `:repo` are replaced with your values: ```bash - gh valet migrate gitlab --target-url https://github.com/:owner/:repo --output-dir ./tmp/migrate --circle-ci-project circleci-hello-world + gh valet migrate circle-ci --target-url https://github.com/:owner/:repo --output-dir ./tmp/migrate --circle-ci-project circleci-hello-world ``` 2. The command will write the URL to the pull request that was created when the command succeeds. @@ -44,9 +44,6 @@ Next, you can inspect the "Files changed" in this pull request and see the conve 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. - - - At this point, the migration has completed and you have successfully migrated a CircleCI pipeline to Actions! ### Next Lab