Rebrand labs

This commit is contained in:
Ethan Dennis
2022-11-03 14:31:03 -07:00
parent 5a4aa125ae
commit cc269ae804
37 changed files with 401 additions and 395 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
# Configure credentials for Valet
# Configure credentials for GitHub Actions Importer
In this lab, you will use the `configure` CLI command to set the required credentials and information for Valet to use when working with GitLab and GitHub.
In this lab, you will use the `configure` CLI command to set the required credentials and information for GitHub Actions Importer to use when working with GitLab and GitHub.
You will need to complete all of the setup instructions [here](./readme.md#configure-your-codespace) prior to performing this lab.
@@ -20,7 +20,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
3. Create a GitLab personal access token (PAT):
- Authenticate with the GitLab server using the following credentials:
- Username: `root`
- Password: `valet-labs!`
- Password: `actions-importer-labs!`
- Follow the GitLab [instructions](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token) to generate a PAT.
- Ensure the token has the `read_api` scope.
- Copy the generated token and save it in a safe location.
@@ -62,7 +62,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
## Verify your environment
To verify your environment is configured correctly, run the `update` CLI command. The `update` CLI command will download the latest version of Valet to your codespace.
To verify your environment is configured correctly, 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:
@@ -70,12 +70,12 @@ To verify your environment is configured correctly, run the `update` CLI command
gh actions-importer update
```
2. You should see a confirmation that you were logged into the GitHub Container Registry and Valet was updated to the latest version.
2. You should see a confirmation that you were logged into the GitHub Container Registry and the image was updated to the latest version.
```console
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
latest: Pulling from actions-importer/cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
+48 -46
View File
@@ -3,9 +3,10 @@
In this lab, you will use the `audit` command to get a high-level view of all pipelines in a GitLab server.
The `audit` command will perform the following steps:
1. Fetch all of the projects defined in a GitLab group.
2. Convert each pipeline to their equivalent GitHub Actions workflow.
3. Generate a report that summarizes how complete and complex of a migration is possible with Valet.
3. Generate a report that summarizes how complete and complex of a migration is possible with GitHub Actions Importer.
## Prerequisites
@@ -17,10 +18,10 @@ The `audit` command will perform the following steps:
You will be performing an audit against your preconfigured GitLab server. Answer the following questions before running this command:
1. What namespace (e.g. group) do you want to audit?
- __valet__. In this example you will be auditing the `valet` group. In the future, you could add additional groups and subgroups to the audit command.
- __actions-importer__. In this example you will be auditing the `actions-importer` group. In the future, you could add additional groups and subgroups to the audit command.
2. Where do you want to store the result?
- __tmp/audit__. This can be any path within the working directory from which Valet commands are executed.
- __tmp/audit__. This can be any path within the working directory from which GitHub Actions Importer commands are executed.
### Steps
@@ -28,7 +29,7 @@ You will be performing an audit against your preconfigured GitLab server. Answer
2. Run the following command from the root directory:
```bash
gh actions-importer audit gitlab --output-dir tmp/audit --namespace valet
gh actions-importer audit gitlab --output-dir tmp/audit --namespace actions-importer
```
3. The command will list all the files written to disk in green when the command succeeds.
@@ -43,7 +44,7 @@ You will be performing an audit against your preconfigured GitLab server. Answer
#### Pipelines
The pipeline summary section contains high level statistics regarding the conversion rate done by Valet:
The pipeline summary section contains high level statistics regarding the conversion rate done by GitHub Actions Importer:
```md
## Pipelines
@@ -70,17 +71,17 @@ Here are some key terms in the “Pipelines” section in the above example:
- __Successful__ pipelines had 100% of the pipeline constructs and individual items converted automatically to their GitHub Actions equivalent.
- __Partially successful__ pipelines had all of the pipeline constructs converted, however, there were some individual items (e.g. build tasks or build triggers) that were not converted automatically to their GitHub Actions equivalent.
- __Unsupported__ pipelines are definition types that are not supported by Valet. Auto DevOps pipelines are not supported.
- __Unsupported__ pipelines are definition types that are not supported by GitHub Actions Importer. Auto DevOps pipelines are not supported.
- __Failed__ pipelines encountered a fatal error when being converted. This can occur for one of three reasons:
- The pipeline was misconfigured and not valid in GitLab.
- Valet encountered an internal error when converting it.
- GitHub Actions Importer encountered an internal error when converting it.
- There was an unsuccessful network response, often due to invalid credentials, that caused the pipeline to be inaccessible.
The "Job types" section will summarize which types of pipelines are being used and which are supported or unsupported by Valet.
The "Job types" section will summarize which types of pipelines are being used and which are supported or unsupported by GitHub Actions Importer.
#### Build steps
The build steps summary section presents an overview of the individual build steps that are used across all pipelines and how many were automatically converted by Valet.
The build steps summary section presents an overview of the individual build steps that are used across all pipelines and how many were automatically converted by GitHub Actions Importer.
```md
### Build steps
@@ -129,7 +130,7 @@ There is an equivalent breakdown of build triggers, environment variables, and o
#### Manual Tasks
The manual tasks summary section presents an overview of the manual tasks that you will need to perform that Valet is not able to complete automatically.
The manual tasks summary section presents an overview of the manual tasks that you will need to perform that GitHub Actions Importer is not able to complete automatically.
```md
### Manual tasks
@@ -153,25 +154,25 @@ The final section of the audit report provides a manifest of all of the files th
```md
### Successful
#### valet/included-files-example
#### actions-importer/included-files-example
- [valet/included-files-example/.github/workflows/included-files-example.yml](valet/included-files-example/.github/workflows/included-files-example.yml)
- [valet/included-files-example/config.json](valet/included-files-example/config.json)
- [valet/included-files-example/source.yml](valet/included-files-example/source.yml)
- [actions-importer/included-files-example/.github/workflows/included-files-example.yml](actions-importer/included-files-example/.github/workflows/included-files-example.yml)
- [actions-importer/included-files-example/config.json](actions-importer/included-files-example/config.json)
- [actions-importer/included-files-example/source.yml](actions-importer/included-files-example/source.yml)
#### valet/terraform-example
#### actions-importer/terraform-example
- [valet/terraform-example/.github/workflows/terraform-example.yml](valet/terraform-example/.github/workflows/terraform-example.yml)
- [valet/terraform-example/config.json](valet/terraform-example/config.json)
- [valet/terraform-example/source.yml](valet/terraform-example/source.yml)
- [actions-importer/terraform-example/.github/workflows/terraform-example.yml](actions-importer/terraform-example/.github/workflows/terraform-example.yml)
- [actions-importer/terraform-example/config.json](actions-importer/terraform-example/config.json)
- [actions-importer/terraform-example/source.yml](actions-importer/terraform-example/source.yml)
#### valet/child-parent-example
#### actions-importer/child-parent-example
- [valet/child-parent-example/.github/workflows/child-parent-example.yml](valet/child-parent-example/.github/workflows/child-parent-example.yml)
- [valet/child-parent-example/.github/workflows/a-.gitlab-ci.yml](valet/child-parent-example/.github/workflows/a-.gitlab-ci.yml)
- [valet/child-parent-example/.github/workflows/b-.gitlab-ci.yml](valet/child-parent-example/.github/workflows/b-.gitlab-ci.yml)
- [valet/child-parent-example/config.json](valet/child-parent-example/config.json)
- [valet/child-parent-example/source.yml](valet/child-parent-example/source.yml)
- [actions-importer/child-parent-example/.github/workflows/child-parent-example.yml](actions-importer/child-parent-example/.github/workflows/child-parent-example.yml)
- [actions-importer/child-parent-example/.github/workflows/a-.gitlab-ci.yml](actions-importer/child-parent-example/.github/workflows/a-.gitlab-ci.yml)
- [actions-importer/child-parent-example/.github/workflows/b-.gitlab-ci.yml](actions-importer/child-parent-example/.github/workflows/b-.gitlab-ci.yml)
- [actions-importer/child-parent-example/config.json](actions-importer/child-parent-example/config.json)
- [actions-importer/child-parent-example/source.yml](actions-importer/child-parent-example/source.yml)
```
Each pipeline will have a variety of files written that include:
@@ -188,35 +189,36 @@ Each pipeline will have a variety of files written that include:
```csv
Pipeline,Action,File path
valet/included-files-example,actions/checkout@v2,tmp/audit/valet/included-files-example/.github/workflows/included-files-example.yml
valet/terraform-example,actions/checkout@v2,tmp/audit/valet/terraform-example/.github/workflows/terraform-example.yml
valet/child-parent-example,actions/checkout@v2,tmp/audit/valet/child-parent-example/.github/workflows/child-parent-example.yml
valet/child-parent-example,./.github/workflows/a-.gitlab-ci.yml,tmp/audit/valet/child-parent-example/.github/workflows/child-parent-example.yml
valet/child-parent-example,./.github/workflows/b-.gitlab-ci.yml,tmp/audit/valet/child-parent-example/.github/workflows/child-parent-example.yml
valet/include-file-example,actions/checkout@v2,tmp/audit/valet/include-file-example/.github/workflows/include-file-example.yml
valet/basic-pipeline-example,actions/checkout@v2,tmp/audit/valet/basic-pipeline-example/.github/workflows/basic-pipeline-example.yml
valet/gatsby-example,actions/checkout@v2,tmp/audit/valet/gatsby-example/.github/workflows/gatsby-example.yml
valet/gatsby-example,actions/cache@v2,tmp/audit/valet/gatsby-example/.github/workflows/gatsby-example.yml
valet/gatsby-example,actions/upload-artifact@v2,tmp/audit/valet/gatsby-example/.github/workflows/gatsby-example.yml
valet/gatsby-example,actions/download-artifact@v2,tmp/audit/valet/gatsby-example/.github/workflows/gatsby-example.yml
valet/gatsby-example,JamesIves/github-pages-deploy-action@4.1.5,tmp/audit/valet/gatsby-example/.github/workflows/gatsby-example.yml
valet/android-example,actions/checkout@v2,tmp/audit/valet/android-example/.github/workflows/android-example.yml
valet/android-example,actions/upload-artifact@v2,tmp/audit/valet/android-example/.github/workflows/android-example.yml
valet/android-example,actions/download-artifact@v2,tmp/audit/valet/android-example/.github/workflows/android-example.yml
valet/dotnet-example,actions/checkout@v2,/data/tmp/audit/valet/dotnet-example/.github/workflows/dotnet-example.yml
valet/dotnet-example,actions/upload-artifact@v2,tmp/audit/valet/dotnet-example/.github/workflows/dotnet-example.yml
valet/dotnet-example,actions/download-artifact@v2,tmp/audit/valet/dotnet-example/.github/workflows/dotnet-example.yml
valet/node-example,actions/checkout@v2,tmp/audit/valet/node-example/.github/workflows/node-example.yml
valet/node-example,actions/cache@v2,tmp/audit/valet/node-example/.github/workflows/node-example.yml
valet/rails-example,actions/checkout@v2,tmp/audit/valet/rails-example/.github/workflows/rails-example.yml
actions-importer/included-files-example,actions/checkout@v2,tmp/audit/actions-importer/included-files-example/.github/workflows/included-files-example.yml
actions-importer/terraform-example,actions/checkout@v2,tmp/audit/actions-importer/terraform-example/.github/workflows/terraform-example.yml
actions-importer/child-parent-example,actions/checkout@v2,tmp/audit/actions-importer/child-parent-example/.github/workflows/child-parent-example.yml
actions-importer/child-parent-example,./.github/workflows/a-.gitlab-ci.yml,tmp/audit/actions-importer/child-parent-example/.github/workflows/child-parent-example.yml
actions-importer/child-parent-example,./.github/workflows/b-.gitlab-ci.yml,tmp/audit/actions-importer/child-parent-example/.github/workflows/child-parent-example.yml
actions-importer/include-file-example,actions/checkout@v2,tmp/audit/actions-importer/include-file-example/.github/workflows/include-file-example.yml
actions-importer/basic-pipeline-example,actions/checkout@v2,tmp/audit/actions-importer/basic-pipeline-example/.github/workflows/basic-pipeline-example.yml
actions-importer/gatsby-example,actions/checkout@v2,tmp/audit/actions-importer/gatsby-example/.github/workflows/gatsby-example.yml
actions-importer/gatsby-example,actions/cache@v2,tmp/audit/actions-importer/gatsby-example/.github/workflows/gatsby-example.yml
actions-importer/gatsby-example,actions/upload-artifact@v2,tmp/audit/actions-importer/gatsby-example/.github/workflows/gatsby-example.yml
actions-importer/gatsby-example,actions/download-artifact@v2,tmp/audit/actions-importer/gatsby-example/.github/workflows/gatsby-example.yml
actions-importer/gatsby-example,JamesIves/github-pages-deploy-action@4.1.5,tmp/audit/actions-importer/gatsby-example/.github/workflows/gatsby-example.yml
actions-importer/android-example,actions/checkout@v2,tmp/audit/actions-importer/android-example/.github/workflows/android-example.yml
actions-importer/android-example,actions/upload-artifact@v2,tmp/audit/actions-importer/android-example/.github/workflows/android-example.yml
actions-importer/android-example,actions/download-artifact@v2,tmp/audit/actions-importer/android-example/.github/workflows/android-example.yml
actions-importer/dotnet-example,actions/checkout@v2,/data/tmp/audit/actions-importer/dotnet-example/.github/workflows/dotnet-example.yml
actions-importer/dotnet-example,actions/upload-artifact@v2,tmp/audit/actions-importer/dotnet-example/.github/workflows/dotnet-example.yml
actions-importer/dotnet-example,actions/download-artifact@v2,tmp/audit/actions-importer/dotnet-example/.github/workflows/dotnet-example.yml
actions-importer/node-example,actions/checkout@v2,tmp/audit/actions-importer/node-example/.github/workflows/node-example.yml
actions-importer/node-example,actions/cache@v2,tmp/audit/actions-importer/node-example/.github/workflows/node-example.yml
actions-importer/rails-example,actions/checkout@v2,tmp/audit/actions-importer/rails-example/.github/workflows/rails-example.yml
Pipeline,Secret,File path
valet/rails-example,${{ secrets.PASSWORD }},tmp/audit/valet/rails-example/.github/workflows/rails-example.yml
actions-importer/rails-example,${{ secrets.PASSWORD }},tmp/audit/actions-importer/rails-example/.github/workflows/rails-example.yml
Pipeline,Runner,File path
```
The contents of this file can be useful in answering questions similar to the following:
- What workflows will depend on which actions?
- What workflows use an action that must go through a security review?
- What workflows use specific secrets?
+2 -2
View File
@@ -12,7 +12,7 @@ In this lab you will use the `forecast` command to forecast potential GitHub Act
Answer the following questions before running the `forecast` command:
1. What namespace do you want to run the forecast for?
- **valet**
- **actions-importer**
2. What is the date you want to start forecasting from?
- **2022-08-02**. This date is needed as it is prior to when the data was seeded in GitLab for these labs. This value defaults to the date one week ago, however, you should use a start date that will show a representative view of typical usage.
3. Where do you want to store the results?
@@ -24,7 +24,7 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh actions-importer forecast gitlab --output-dir tmp/forecast --namespace valet --start-date 2022-08-02
gh actions-importer forecast gitlab --output-dir tmp/forecast --namespace actions-importer --start-date 2022-08-02
```
3. The command will list all the files written to disk when the command succeeds.
+12 -12
View File
@@ -16,10 +16,10 @@ You will be performing a dry run against a pipeline in your preconfigured GitLab
- __basic-pipeline-example__
2. What is the namespace for that project?
- __Valet__
- __actions-importer__
3. Where do you want to store the result?
- __tmp/dry-run__. This can be any path within the working directory from which Valet commands are executed.
- __tmp/dry-run__. This can be any path within the working directory from which GitHub Actions Importer commands are executed.
### Steps
@@ -27,20 +27,20 @@ You will be performing a dry run against a pipeline in your preconfigured GitLab
2. Run the following command from the root directory:
```bash
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace valet --project basic-pipeline-example
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace actions-importer --project basic-pipeline-example
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace valet --project basic-pipeline-example
[2022-09-28 19:59:55] Logs: 'tmp/dry-run/log/valet-20220928-195955.log'
$ gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace actions-importer --project basic-pipeline-example
[2022-09-28 19:59:55] Logs: 'tmp/dry-run/log/actions-importer-20220928-195955.log'
[2022-09-28 19:59:56] Output file(s):
[2022-09-28 19:59:56] tmp/dry-run/valet/basic-pipeline-example/.github/workflows/basic-pipeline-example.yml
[2022-09-28 19:59:56] tmp/dry-run/actions-importer/basic-pipeline-example/.github/workflows/basic-pipeline-example.yml
```
4. View the converted workflow:
- Find `tmp/dry-run/valet/basic-pipeline-example/.github/workflows` in the file explorer pane in your codespace.
- Find `tmp/dry-run/actions-importer/basic-pipeline-example/.github/workflows` in the file explorer pane in your codespace.
- Click `basic-pipeline-example.yml` to open.
## Inspect the output files
@@ -105,7 +105,7 @@ deploy_b:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet/basic-pipeline-example
name: actions-importer/basic-pipeline-example
on:
push:
workflow_dispatch:
@@ -219,13 +219,13 @@ include:
Run the following command from the root directory:
```bash
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace valet --project included-files-example
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace actions-importer --project included-files-example
```
The output of the command above can be seen below:
```yaml
name: valet/included-files-example
name: actions-importer/included-files-example
on:
push:
pull_request:
@@ -257,10 +257,10 @@ jobs:
- run: echo "this is from a local file"
```
It's important to note that Valet converted this into a single workflow without templates. This is because of fundamental differences in how GitLab templates and GitHub Actions templates (i.e. Reusable Workflows and Composite Actions) function in regards to job ordering. Unfortunately, elements of reusability will be sacrificed in order for the converted pipelines to function the same. It is likely that the output of Valet could be refactored to use [reusable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) at a later date.
It's important to note that GitHub Actions Importer converted this into a single workflow without templates. This is because of fundamental differences in how GitLab templates and GitHub Actions templates (i.e. Reusable Workflows and Composite Actions) function in regards to job ordering. Unfortunately, elements of reusability will be sacrificed in order for the converted pipelines to function the same. It is likely that the output of GitHub Actions Importer could be refactored to use [reusable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) at a later date.
As an added challenge, try constructing and running the `dry-run` command yourself. Hint, you should only have to change the project name.
## Next lab
[Use custom transformers to customize Valet's behavior](./5-custom-transformers.md)
[Use custom transformers to customize GitHub Actions Importer's behavior](./5-custom-transformers.md)
+10 -10
View File
@@ -1,6 +1,6 @@
# Using custom transformers to customize Valet's behavior
# Using custom transformers to customize GitHub Actions Importer's behavior
In this lab you will build upon the `dry-run` command to override Valet's default behavior and customize the converted workflow using "custom transformers". Custom transformers can be used to:
In this lab you will build upon the `dry-run` command to override GitHub Actions Importer's default behavior and customize the converted workflow using "custom transformers". Custom transformers can be used to:
1. Convert items that are not automatically converted.
2. Convert items that were automatically converted using different actions.
@@ -18,7 +18,7 @@ In this lab you will build upon the `dry-run` command to override Valet's defaul
You will be performing a `dry-run` command to inspect the workflow that is converted by default. Run the following command within the codespace terminal:
```bash
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace valet --project terraform-example
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace actions-importer --project terraform-example
```
The converted workflow that is generated by the above command can be seen below:
@@ -27,7 +27,7 @@ The converted workflow that is generated by the above command can be seen below:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet/custom-transformer
name: actions-importer/custom-transformer
on:
push:
workflow_dispatch:
@@ -87,16 +87,16 @@ transform "artifacts.terraform" do |item|
end
```
The `transform` method can use any valid ruby syntax and should return a `Hash` that represents the YAML that should be generated for a given step. Valet will use this method to convert a step with the provided identifier and will use the `item` parameter for the original values configured in GitLab.
The `transform` method can use any valid ruby syntax and should return a `Hash` that represents the YAML that should be generated for a given step. GitHub Actions Importer will use this method to convert a step with the provided identifier and will use the `item` parameter for the original values configured in GitLab.
Now, we can perform a `dry-run` command with the `--custom-transformers` CLI option. The output of the `dry-run` command should look similar to this:
```console
$ gh actions-importer dry-run gitlab --output-dir tmp --namespace valet --project terraform-example --custom-transformers transformers.rb
[2022-09-28 20:29:41] Logs: 'tmp/log/valet-20220928-202941.log'
$ gh actions-importer dry-run gitlab --output-dir tmp --namespace actions-importer --project terraform-example --custom-transformers transformers.rb
[2022-09-28 20:29:41] Logs: 'tmp/log/actions-importer-20220928-202941.log'
This is the item: $PLAN_JSON
[2022-09-28 20:29:43] Output file(s):
[2022-09-28 20:29:43] tmp/valet/terraform-example/.github/workflows/terraform-example.yml
[2022-09-28 20:29:43] tmp/actions-importer/terraform-example/.github/workflows/terraform-example.yml
```
Now that you know the data structure of `item`, you can access the file path programmatically by editing the custom transformer to the following:
@@ -115,7 +115,7 @@ end
Now you can perform another `dry-run` command and use the `--custom-transformers` CLI option to provide this custom transformer. Run the following command within your codespace terminal:
```bash
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace valet --project terraform-example --custom-transformers transformers.rb
gh actions-importer dry-run gitlab --output-dir tmp/dry-run --namespace actions-importer --project terraform-example --custom-transformers transformers.rb
```
The converted workflow that is generated by the above command will now use the custom logic for the `artifacts.terraform` step.
@@ -196,7 +196,7 @@ At this point, the file contents of `transformers.rb` should match this:
</details>
That's it! Congratulations, you have overridden Valet's default behavior by customizing the conversion of:
That's it! Congratulations, you have overridden GitHub Actions Importer's default behavior by customizing the conversion of:
- Unknown steps
- Environment variables
+3 -3
View File
@@ -15,7 +15,7 @@ Answer the following questions before running a `migrate` command:
1. What project do you want to migrate?
- __rails-example__
2. What is the namespace for that project?
- __Valet__
- __actions-importer__
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?
@@ -26,7 +26,7 @@ Answer the following questions before running a `migrate` command:
1. Run the following `migrate` command in the codespace terminal:
```bash
gh actions-importer migrate gitlab --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --namespace valet --project rails-example
gh actions-importer migrate gitlab --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --namespace actions-importer --project rails-example
```
2. The command will write the URL to the pull request that was created when the command succeeds.
@@ -49,4 +49,4 @@ At this point, the migration has completed and you have successfully migrated a
### Next Lab
This concludes all labs for migrating GitLab pipelines to Actions with Valet!
This concludes all labs for migrating GitLab pipelines to Actions with GitHub Actions Importer!
+18 -18
View File
@@ -1,12 +1,12 @@
# GitLab to Actions migrations powered by Valet
# GitLab to Actions migrations powered by GitHub Actions Importer
These instructions will guide you through configuring the GitHub Codespaces environment that will be used in these labs that demonstrate how to use Valet to migrate GitLab pipelines to GitHub Actions.
These instructions will guide you through configuring the GitHub Codespaces environment that will be used in these labs that demonstrate how to use GitHub Actions Importer to migrate GitLab pipelines to GitHub Actions.
These steps **must** be completed prior to starting other labs.
## Create your own repository for these labs
- Ensure that you have created a repository using [valet-customers/labs](https://github.com/valet-customers/labs) as a template.
- Ensure that you have created a repository using [actions/importer-labs](https://github.com/actions/importer-labs) as a template.
## Configure your codespace
@@ -17,7 +17,7 @@ These steps **must** be completed prior to starting other labs.
- Click `Create codespaces on main` to create the codespace.
- After the codespace has initialized there will be a terminal present.
2. Verify the Valet CLI is installed and working. More information on the Valet extension for the official GitHub CLI can be found [here](https://github.com/github/gh-valet).
2. Verify the GitHub Actions Importer CLI is installed and working. More information on the GitHub Actions Importer extension for the official GitHub CLI can be found [here](https://github.com/github/gh-actions-importer).
- Run the following command in the codespace terminal:
@@ -30,11 +30,11 @@ These steps **must** be completed prior to starting other labs.
```console
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
gh actions-importer github/gh-actions-importer v0.1.12
actions-importer/cli unknown
```
- If `gh actions-importer version` did not produce similar output, please refer to the troubleshooting [guide](#troubleshoot-the-valet-cli).
- If `gh actions-importer version` did not produce similar output, please refer to the troubleshooting [guide](#troubleshoot-the-actions-importer/cli).
## Bootstrap a GitLab server
@@ -53,43 +53,43 @@ These steps **must** be completed prior to starting other labs.
2. Open the GitLab server in your browser and use the following credentials to authenticate:
- Username: `root`
- Password: `valet-labs!`
- Password: `actions-importer-labs!`
3. Once authenticated, you should see a GitLab server with a few predefined pipelines in the `valet` group.
3. Once authenticated, you should see a GitLab server with a few predefined pipelines in the `actions-importer` group.
## Labs for GitLab
Perform the following labs to learn more about Actions migrations with Valet:
Perform the following labs to learn more about Actions migrations with GitHub Actions Importer:
1. [Configure credentials for Valet](1-configure.md)
1. [Configure credentials for GitHub Actions Importer](1-configure.md)
2. [Perform an audit on GitLab pipelines](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run migration of a GitLab pipeline](4-dry-run.md)
5. [Use custom transformers to customize Valet's behavior](5-custom-transformers.md)
5. [Use custom transformers to customize GitHub Actions Importer's behavior](5-custom-transformers.md)
6. [Perform a production migration of a GitLab pipeline](6-migrate.md)
## Troubleshoot the Valet CLI
## Troubleshoot the GitHub Actions Importer CLI
The CLI extension for Valet can be manually installed by following these steps:
The CLI extension for GitHub Actions Importer can be manually installed by following these steps:
- Verify you are in the codespace terminal
- Run this command from within the codespace terminal:
```bash
gh extension install github/gh-valet
gh extension install github/gh-actions-importer
```
- Verify the result of the install contains:
```console
$ gh extension install github/gh-valet
✓ Installed extension github/gh-valet
$ gh extension install github/gh-actions-importer
✓ Installed extension github/gh-actions-importer
```
- If you get an error similar to the image below, 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 Valet CLI extension is installed and working by running the following command from the codespace terminal:
- Verify GitHub Actions Importer CLI extension is installed and working by running the following command from the codespace terminal:
```bash
gh actions-importer version