From 5e4fef4f59925019a6f50b69411c8bb2f6dccf52 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 15 Sep 2022 13:40:40 -0700 Subject: [PATCH 1/3] Added travis migrate lab --- travis/5-migrate.md | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 travis/5-migrate.md diff --git a/travis/5-migrate.md b/travis/5-migrate.md new file mode 100644 index 0000000..0efd2e9 --- /dev/null +++ b/travis/5-migrate.md @@ -0,0 +1,51 @@ +# Perform a production migration of a Travis CI pipeline + +In this lab, you will use the `migrate` command to convert a Travis CI 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.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. 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 follow the pattern with `:owner` and `:repo` replaced with your values. + +### Steps + +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 travis-ci --target-url https://github.com/:owner/:repo --output-dir ./tmp/migrate --travis-ci-repository "deploy-example" + ``` + +2. The command will write the URL to the pull request that was created when the command succeeds. + + ![pr](https://user-images.githubusercontent.com/19557880/190496147-2f8af72d-51d9-426b-94cf-5d0d7fe02eb3.png) + +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. + +![action-run](https://user-images.githubusercontent.com/19557880/190496147-2f8af72d-51d9-426b-94cf-5d0d7fe02eb3.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. + +At this point, the migration has completed and you have successfully migrated a Travis CI pipeline to Actions! + +### Next Lab + +[Forecast potential build runner usage](6-forecast.md) From 6f181fc899165e701d004f6e7c38e6cfb000871d Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 16 Sep 2022 09:39:22 -0700 Subject: [PATCH 2/3] Update travis/5-migrate.md --- travis/5-migrate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/5-migrate.md b/travis/5-migrate.md index 0efd2e9..1986da2 100644 --- a/travis/5-migrate.md +++ b/travis/5-migrate.md @@ -14,7 +14,7 @@ In this lab, you will use the `migrate` command to convert a Travis CI pipeline Answer the following questions before running a `migrate` command: 1. What project do you want to migrate? - - __circleci-hello-world__ + - __deploy-example__ 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? From 9d911df691c84282643cf4cc58ec567e03b21c0e Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 16 Sep 2022 09:52:42 -0700 Subject: [PATCH 3/3] Update travis/5-migrate.md --- travis/5-migrate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/5-migrate.md b/travis/5-migrate.md index 1986da2..8dcf3db 100644 --- a/travis/5-migrate.md +++ b/travis/5-migrate.md @@ -30,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. - ![pr](https://user-images.githubusercontent.com/19557880/190496147-2f8af72d-51d9-426b-94cf-5d0d7fe02eb3.png) + ![pr](https://user-images.githubusercontent.com/19557880/190689859-d16a678b-f08f-44c1-a819-780ea967ecaf.png) 3. Open the generated pull request in a new browser tab.