Merge branch 'main' into JenniferKerns-patch-11

This commit is contained in:
Ethan Dennis
2022-11-06 18:01:36 -08:00
committed by GitHub
9 changed files with 54 additions and 59 deletions
+20 -20
View File
@@ -6,29 +6,29 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
## Configuring credentials
1. Create a GitHub Personal Access Token (PAT):
- Open github.com in a new browser tab.
- Click your profile photo in the top right of the UI and click `Settings`.
- Click on `Developer Settings` in the left hand panel.
- Click `Personal Access Tokens` and then `Legacy tokens` (if present).
- Click `Generate new token` and then `Legacy tokens`. You may be required to authenticate with GitHub during this step.
- Select the following scopes: `read:packages` and `workflow`.
- Click `Generate token`.
- Copy the generated PAT and save in a safe location.
1. Create a GitHub personal access token (PAT):
- Open github.com in a new browser tab.
- In the top right of the UI, click your profile photo and then click `Settings`.
- In the left panel, click `Developer Settings`.
- Click `Personal access tokens` and then `Tokens (classic)` (if present).
- Click `Generate new token` and then `Generate new token (classic)`. You may be required to authenticate with GitHub during this step.
- Select the following scopes: `read:packages` and `workflow`.
- Click `Generate token`.
- Copy the generated PAT and save in a safe location.
3. Create a CircleCI personal API token using CircleCI's [documentation](https://circleci.com/docs/managing-api-tokens#creating-a-personal-api-token) and store the token in a safe location.
2. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal window.
- Run the following command: `gh actions-importer configure`.
- Using the down arrow key to highlight `CircleCI`, press the spacebar to select, and then hit enter to continue.
- At the GitHub handle prompt, enter the GitHub username used to generate the GitHub PAT in step 2 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 1 and press enter.
- At the GitHub PAT prompt, enter the GitHub PAT generated in step 1 and press enter.
- At the GitHub url prompt, enter the GitHub instance url or hit enter to accept the default value (`https://github.com`).
- At the CircleCI token prompt, enter the CircleCI access token from step 2 and press enter.
- At the CircleCI base url prompt, hit enter to accept the default value (`https://circleci.com`).
- At the CircleCI organization name prompt, enter `actions-importer-labs`. This is the organization we'll be using throughout these labs.
- Select the `TERMINAL` tab from within the codespace terminal window.
- Run the following command: `gh actions-importer configure`.
- Using the down arrow key to highlight `CircleCI`, press the spacebar to select, and then press enter to continue.
- At the GitHub handle prompt, enter the GitHub username used to generate the GitHub PAT in step 2 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 1 and press enter.
- At the GitHub PAT prompt, enter the GitHub PAT generated in step 1 and press enter.
- At the GitHub URL prompt, enter the GitHub instance URL or press enter to accept the default value (`https://github.com`).
- At the CircleCI token prompt, enter the CircleCI access token from step 2 and press enter.
- At the CircleCI base URL prompt, press enter to accept the default value (`https://circleci.com`).
- At the CircleCI organization name prompt, enter `actions-importer-labs`. This is the organization you'll be using throughout these labs.
```console
$ gh actions-importer configure
@@ -46,7 +46,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
## Verify your environment
To verify our environment is configured correctly, we are going to run the `update` CLI command. The `update` CLI command will download the latest version of GitHub Actions Importer to your codespace.
To verify your environment is configured correctly, you are going to run the `update` CLI command. The `update` CLI command will download the latest version of GitHub Actions Importer to your codespace.
1. In the codespace terminal run the following command:
+4 -4
View File
@@ -4,8 +4,8 @@ In this lab, you will use the `audit` command to get a high-level view of all pr
The `audit` command will perform the following steps:
1. Fetch all of the projects defined in an CircleCI organization.
2. Convert each pipeline to their equivalent GitHub Actions workflow.
1. Fetch all of the projects defined in a CircleCI organization.
2. Convert each pipeline to its equivalent GitHub Actions workflow.
3. Generate a report that summarizes how complete and complex of a migration is possible with GitHub Actions Importer.
## Prerequisites
@@ -17,7 +17,7 @@ The `audit` command will perform the following steps:
You will be performing an `audit` for the __actions-importer-labs__ CircleCI organization that was created for the purposes of these labs. Your environment was configured to use this organization during the [configure lab](./1-configure.md). The remaining information needed to perform an `audit` is:
1. Where do we want to store the result?
1. Where do you want to store the result?
- __tmp/audit__. This can be any path within the working directory that GitHub Actions Importer commands are executed from.
### Steps
@@ -194,7 +194,7 @@ Each pipeline will have a variety of files written that include:
- The converted workflow.
- Stack traces that can used to troubleshoot a failed pipeline conversion
## Inspect the workflow usage csv file
## Inspect the workflow usage .csv file
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
+5 -8
View File
@@ -1,6 +1,6 @@
# CircleCI to Actions migrations powered by GitHub Actions Importer
# CircleCI migrations powered by GitHub Actions Importer
The instructions below will guide you through configuring a GitHub Codespace environment that will be used in subsequent labs that demonstrate how to use GitHub Actions Importer to migrate CircleCI pipelines to GitHub Actions.
The instructions below will guide you through configuring a GitHub Codespace environment that you will use in subsequent labs to learn how to use GitHub Actions Importer to migrate CircleCI pipelines to GitHub Actions.
These steps **must** be completed prior to starting other labs.
@@ -12,8 +12,8 @@ These steps **must** be completed prior to starting other labs.
1. Start a new Codespace.
- Click the `Code` with button down arrow above repository on the repository's landing page.
- Click the `Codespaces` tab
- Click the `Code` button on your repository's landing page.
- Click the `Codespaces` tab.
- Click `Create codespaces on main` to create the codespace.
- After the Codespace has initialized there will be a terminal present.
@@ -34,7 +34,7 @@ These steps **must** be completed prior to starting other labs.
actions-importer/cli unknown
```
- If `gh actions-importer version` did not produce similar output, refer to the troubleshooting [guide](#troubleshoot-the-actions-importer/cli).
- If `gh actions-importer version` did not produce similar output, refer to the [troubleshooting section](#troubleshoot-the-github-actions-importer-cli).
## Labs for CircleCI
@@ -65,9 +65,6 @@ The CLI extension for GitHub Actions Importer can be manually installed by follo
✓ Installed extension github/gh-actions-importer
```
- If you get an error similar to the image below, then click the link in the terminal output to authorize the token.
- Restart the codespace after clicking the link.
![img](https://user-images.githubusercontent.com/26442605/169588015-9414404f-82b6-4d0f-89d4-5f0e6941b029.png)
- Verify GitHub Actions Importer CLI extension is installed and working by running the following command from the codespace's terminal:
```bash