Rebrand labs

This commit is contained in:
Ethan Dennis
2022-11-03 12:47:40 -07:00
parent 5a4aa125ae
commit cc269ae804
37 changed files with 401 additions and 395 deletions
+18 -18
View File
@@ -150,23 +150,23 @@ The final section of the audit report provides a manifest of all of the files th
```md
### Successful
#### valet-bootstrap/pipelines/valet-pipeline2
#### actions-importer-bootstrap/pipelines/pipeline2
- [pipelines/valet-bootstrap/pipelines/valet-pipeline2/.github/workflows/valet-pipeline2.yml](pipelines/valet-bootstrap/pipelines/valet-pipeline2/.github/workflows/valet-pipeline2.yml)
- [pipelines/valet-bootstrap/pipelines/valet-pipeline2/config.json](pipelines/valet-bootstrap/pipelines/valet-pipeline2/config.json)
- [pipelines/valet-bootstrap/pipelines/valet-pipeline2/source.yml](pipelines/valet-bootstrap/pipelines/valet-pipeline2/source.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/config.json](pipelines/actions-importer-bootstrap/pipelines/pipeline2/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/source.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline2/source.yml)
#### valet-bootstrap/pipelines/valet-pipeline1
#### actions-importer-bootstrap/pipelines/pipeline1
- [pipelines/valet-bootstrap/pipelines/valet-pipeline1/.github/workflows/valet-pipeline1.yml](pipelines/valet-bootstrap/pipelines/valet-pipeline1/.github/workflows/valet-pipeline1.yml)
- [pipelines/valet-bootstrap/pipelines/valet-pipeline1/config.json](pipelines/valet-bootstrap/pipelines/valet-pipeline1/config.json)
- [pipelines/valet-bootstrap/pipelines/valet-pipeline1/source.yml](pipelines/valet-bootstrap/pipelines/valet-pipeline1/source.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/config.json](pipelines/actions-importer-bootstrap/pipelines/pipeline1/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/source.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline1/source.yml)
#### valet-bootstrap/pipelines/valet-custom-transformer-example
#### actions-importer-bootstrap/pipelines/custom-transformer-example
- [pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml](pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml)
- [pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/config.json](pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/config.json)
- [pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/source.yml](pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/source.yml)
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml)
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/config.json](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/source.yml](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/source.yml)
```
Each pipeline will have a variety of files written that include:
@@ -183,17 +183,17 @@ Each pipeline will have a variety of files written that include:
```csv
Pipeline,Action,File path
valet-bootstrap/pipelines/valet-pipeline2,actions/checkout@v2,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-pipeline2/.github/workflows/valet-pipeline2.yml
valet-bootstrap/pipelines/valet-pipeline1,actions/checkout@v2,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-pipeline1/.github/workflows/valet-pipeline1.yml
valet-bootstrap/pipelines/valet-custom-transformer-example,actions/checkout@v2,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml
valet-bootstrap/pipelines/valet-custom-transformer-example,actions/setup-node@v2,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml
actions-importer-bootstrap/pipelines/pipeline2,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml
actions-importer-bootstrap/pipelines/pipeline1,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml
actions-importer-bootstrap/pipelines/custom-transformer-example,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml
actions-importer-bootstrap/pipelines/custom-transformer-example,actions/setup-node@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml
Pipeline,Secret,File path
Pipeline,Runner,File path
valet-bootstrap/pipelines/valet-pipeline2,mechamachine,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-pipeline2/.github/workflows/valet-pipeline2.yml
valet-bootstrap/pipelines/valet-custom-transformer-example,mechamachine,tmp/audit/pipelines/valet-bootstrap/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml
actions-importer-bootstrap/pipelines/pipeline2,mechamachine,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml
actions-importer-bootstrap/pipelines/custom-transformer-example,mechamachine,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml
```
The contents of this file can be useful in answering questions similar to the following:
+6 -6
View File
@@ -15,11 +15,11 @@ You will perform a dry run for a pipeline in the bootstrapped Azure DevOps proje
1. What is the id of the pipeline to convert?
- __:pipeline_id__. This id can be found by:
- Navigating to the build pipelines in the bootstrapped Azure DevOps project <https://dev.azure.com/:organization/:project/_build>
- Selecting the pipeline with the name "valet-pipeline1"
- Selecting the pipeline with the name "pipeline1"
- Inspecting the URL to locate the pipeline id <https://dev.azure.com/:organization/:project/_build?definitionId=:pipeline_id>
2. 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
@@ -32,8 +32,8 @@ You will perform a dry run for a pipeline in the bootstrapped Azure DevOps proje
3. The command will list all the files written to disk when the command succeeds.
4. View the converted workflow:
- Find `tmp/dry-run/pipelines/lab-testing/pipelines/valet-pipeline1/.github/workflows` in the file explorer pane in your codespace.
- Click `valet-pipeline1.yml` to open.
- Find `tmp/dry-run/pipelines/lab-testing/pipelines/pipeline1/.github/workflows` in the file explorer pane in your codespace.
- Click `pipeline1.yml` to open.
## Inspect the output files
@@ -65,7 +65,7 @@ steps:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-bootstrap/pipelines/valet-pipeline1
name: actions-importer-bootstrap/pipelines/pipeline1
on:
push:
branches:
@@ -90,4 +90,4 @@ Despite these two pipelines using different syntax they will function equivalent
## 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)
+12 -12
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 we 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 we 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.
@@ -21,11 +21,11 @@ You will perform a dry-run for a pipeline in the bootstrapped Azure DevOps proje
1. What is the id of the pipeline to convert?
- __:pipeline_id__. This id can be found by:
- Navigating to the build pipelines in the bootstrapped Azure DevOps project <https://dev.azure.com/:organization/:project/_build>
- Selecting the pipeline with the name "valet-custom-transformer-example"
- Selecting the pipeline with the name "custom-transformer-example"
- Inspecting the URL to locate the pipeline id <https://dev.azure.com/:organization/:project/_build?definitionId=:pipeline_id>
2. 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
@@ -38,8 +38,8 @@ You will perform a dry-run for a pipeline in the bootstrapped Azure DevOps proje
3. The command will list all the files written to disk when the command succeeds.
4. View the converted workflow:
- Find `tmp/dry-run/pipelines/lab-testing/pipelines/valet-custom-transformer-example/.github/workflows` in the file explorer pane in your codespace.
- Click `valet-custom-transformer-example.yml` to open.
- Find `tmp/dry-run/pipelines/lab-testing/pipelines/custom-transformer-example/.github/workflows` in the file explorer pane in your codespace.
- Click `custom-transformer-example.yml` to open.
The converted workflow that is generated can be seen below:
@@ -47,7 +47,7 @@ The converted workflow that is generated can be seen below:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-bootstrap/pipelines/valet-custom-transformer-example
name: actions-importer-bootstrap/pipelines/custom-transformer-example
on:
push:
branches:
@@ -81,7 +81,7 @@ _Note_: You can refer to the previous [lab](./4-dry-run.md) to learn about the f
## Custom transformers for build steps
You can use custom transformers to override Valet's default behavior. In this scenario, you may want to override the behavior for converting `DotnetCoreCLI@2` tasks to support parameters that are glob patterns. Answer the following questions before writing a custom transformer:
You can use custom transformers to override GitHub Actions Importer's default behavior. In this scenario, you may want to override the behavior for converting `DotnetCoreCLI@2` tasks to support parameters that are glob patterns. Answer the following questions before writing a custom transformer:
1. What is the "identifier" of the step to customize?
- __DotnetCoreCLI@2__
@@ -110,17 +110,17 @@ transform "DotNetCoreCLI@2" 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 Azure DevOps.
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 Azure DevOps.
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 azure-devops pipeline --pipeline-id 6 --output-dir tmp/dry-run --custom-transformers transformers.rb
[2022-09-20 18:39:50] Logs: 'tmp/dry-run/log/valet-20220920-183950.log'
[2022-09-20 18:39:50] Logs: 'tmp/dry-run/log/actions-importer-20220920-183950.log'
This is the item: {"command"=>"restore", "projects"=>"$(BuildParameters.RESTOREBUILDPROJECTS)"}
This is the item: {"projects"=>"$(BuildParameters.RESTOREBUILDPROJECTS)", "arguments"=>"--configuration $(BUILDCONFIGURATION)"}
[2022-09-20 18:39:51] Output file(s):
[2022-09-20 18:39:51] tmp/dry-run/pipelines/lab-testing/pipelines/valet-custom-transformer-example/.github/workflows/valet-custom-transformer-example.yml
[2022-09-20 18:39:51] tmp/dry-run/pipelines/lab-testing/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml
```
In the above command you will see two instances of `item` printed to the console. This is because there are two `DotNetCoreCLI@2` steps in the pipeline. Each item listed above represents each `DotNetCoreCLI@2` step in the order that they are defined in the pipeline.
@@ -247,7 +247,7 @@ runner "mechamachine", "ubuntu-latest"
</details>
That's it! At this point you have overridden Valet's default behavior by customizing the conversion of:
That's it! At this point you have overridden GitHub Actions Importer's default behavior by customizing the conversion of:
- Build steps
- Environment variables
+3 -3
View File
@@ -15,7 +15,7 @@ Answer the following questions before running a `migrate` command:
1. What is the id of the pipeline to convert?
- __:pipeline_id__. This id can be found by:
- Navigating to the build pipelines in the bootstrapped Azure DevOps project <https://dev.azure.com/:organization/:project/_build>
- Selecting the pipeline with the name "valet-pipeline2"
- Selecting the pipeline with the name "pipeline2"
- Inspecting the URL to locate the pipeline id <https://dev.azure.com/:organization/:project/_build?definitionId=:pipeline_id>
2. Where do you want to store the logs?
- __tmp/migrate__
@@ -34,7 +34,7 @@ Answer the following questions before running a `migrate` command:
```console
$ 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/valet-20220907-202508.log'
[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'
```
@@ -56,4 +56,4 @@ At this point, the migration has completed and you have successfully migrated an
### Next lab
This concludes all labs for migrating Azure DevOps pipelines to Actions with Valet!
This concludes all labs for migrating Azure DevOps pipelines to Actions with GitHub Actions Importer!
Binary file not shown.
+1 -1
View File
@@ -51,7 +51,7 @@ def create_project(options)
project_to_create = {
name: project,
description: "Project to be used for Valet Labs",
description: "Project to be used for GitHub Actions Importer Labs",
capabilities: {
versioncontrol: {
sourceControlType: "Git"
+16 -16
View File
@@ -1,12 +1,12 @@
# Azure Pipelines to Actions migrations powered by Valet
# Azure Pipelines 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 to demonstrate how to use Valet to migrate Azure DevOps pipelines to GitHub Actions.
These instructions will guide you through configuring the GitHub Codespaces environment that will be used in these labs to demonstrate how to use GitHub Actions Importer to migrate Azure DevOps 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 your Azure DevOps organization
@@ -74,37 +74,37 @@ These steps **must** be completed prior to starting other labs.
## Labs for Azure DevOps
Perform the following labs to learn how to migrate Azure DevOps pipelines to GitHub Actions using Valet:
Perform the following labs to learn how to migrate Azure DevOps pipelines to GitHub Actions using 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 of an Azure DevOps project](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run migration of an Azure DevOps 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 Azure DevOps 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
+7 -7
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 CircleCI 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 CircleCI and GitHub.
You will need to complete all of the setup instructions [here](./readme.md#configure-your-codespace) prior to performing this lab.
@@ -28,7 +28,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- 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 `valet-labs`. This is the organization we'll be using throughout these labs.
- At the CircleCI organization name prompt, enter `actions-importer-labs`. This is the organization we'll be using throughout these labs.
```console
$ gh actions-importer configure
@@ -40,13 +40,13 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
✔ Base url of the GitHub instance: https://github.com
✔ Personal access token for CircleCI: ***************
✔ Base url of the CircleCI instance: https://circleci.com
✔ CircleCI organization name: valet-labs
✔ CircleCI organization name: actions-importer-labs
Environment variables successfully updated.
```
## 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 Valet to your codespace.
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.
1. In the codespace terminal run the following command:
@@ -54,12 +54,12 @@ To verify our environment is configured correctly, we are going to run the `upda
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 -47
View File
@@ -3,21 +3,22 @@
In this lab, you will use the `audit` command to get a high-level view of all projects in a CircleCI organization.
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.
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
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#configure-credentials-for-valet).
2. Completed the [configure lab](./1-configure.md).
## Perform an audit
You will be performing an `audit` for the __valet-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:
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?
- __tmp/audit__. This can be any path within the working directory that Valet commands are executed from.
- __tmp/audit__. This can be any path within the working directory that GitHub Actions Importer commands are executed from.
### Steps
@@ -40,7 +41,7 @@ You will be performing an `audit` for the __valet-labs__ CircleCI organization t
#### 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
@@ -66,14 +67,14 @@ Here are some key terms that can appear in the “Pipelines” section:
- __Partially successful__ pipelines had all of the pipeline constructs converted, however, there were some individual items that were not converted automatically to their GitHub Actions equivalent.
- __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 CircleCI.
- 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
@@ -122,7 +123,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
@@ -146,44 +147,44 @@ The final section of the audit report provides a manifest of all of the files th
```md
### Successful
#### valet-labs/circleci-hello-world
#### actions-importer-labs/circleci-hello-world
- [valet-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml](valet-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml)
- [valet-labs/circleci-hello-world/config.json](valet-labs/circleci-hello-world/config.json)
- [valet-labs/circleci-hello-world/source.yml](valet-labs/circleci-hello-world/source.yml)
- [actions-importer-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml](actions-importer-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml)
- [actions-importer-labs/circleci-hello-world/config.json](actions-importer-labs/circleci-hello-world/config.json)
- [actions-importer-labs/circleci-hello-world/source.yml](actions-importer-labs/circleci-hello-world/source.yml)
#### valet-labs/circleci-command-example
#### actions-importer-labs/circleci-command-example
- [valet-labs/circleci-command-example/.github/workflows/my-workflow.yml](valet-labs/circleci-command-example/.github/workflows/my-workflow.yml)
- [valet-labs/circleci-command-example/.github/actions/greeting/action.yml](valet-labs/circleci-command-example/.github/actions/greeting/action.yml)
- [valet-labs/circleci-command-example/config.json](valet-labs/circleci-command-example/config.json)
- [valet-labs/circleci-command-example/source.yml](valet-labs/circleci-command-example/source.yml)
- [actions-importer-labs/circleci-command-example/.github/workflows/my-workflow.yml](actions-importer-labs/circleci-command-example/.github/workflows/my-workflow.yml)
- [actions-importer-labs/circleci-command-example/.github/actions/greeting/action.yml](actions-importer-labs/circleci-command-example/.github/actions/greeting/action.yml)
- [actions-importer-labs/circleci-command-example/config.json](actions-importer-labs/circleci-command-example/config.json)
- [actions-importer-labs/circleci-command-example/source.yml](actions-importer-labs/circleci-command-example/source.yml)
#### valet-labs/circleci-python-example
#### actions-importer-labs/circleci-python-example
- [valet-labs/circleci-python-example/.github/workflows/sample.yml](valet-labs/circleci-python-example/.github/workflows/sample.yml)
- [valet-labs/circleci-python-example/config.json](valet-labs/circleci-python-example/config.json)
- [valet-labs/circleci-python-example/source.yml](valet-labs/circleci-python-example/source.yml)
- [actions-importer-labs/circleci-python-example/.github/workflows/sample.yml](actions-importer-labs/circleci-python-example/.github/workflows/sample.yml)
- [actions-importer-labs/circleci-python-example/config.json](actions-importer-labs/circleci-python-example/config.json)
- [actions-importer-labs/circleci-python-example/source.yml](actions-importer-labs/circleci-python-example/source.yml)
#### valet-labs/circleci-demo-java-spring
#### actions-importer-labs/circleci-demo-java-spring
- [valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml](valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml)
- [valet-labs/circleci-demo-java-spring/config.json](valet-labs/circleci-demo-java-spring/config.json)
- [valet-labs/circleci-demo-java-spring/source.yml](valet-labs/circleci-demo-java-spring/source.yml)
- [actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml](actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml)
- [actions-importer-labs/circleci-demo-java-spring/config.json](actions-importer-labs/circleci-demo-java-spring/config.json)
- [actions-importer-labs/circleci-demo-java-spring/source.yml](actions-importer-labs/circleci-demo-java-spring/source.yml)
#### valet-labs/circleci-demo-ruby-rails
#### actions-importer-labs/circleci-demo-ruby-rails
- [valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml](valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml)
- [valet-labs/circleci-demo-ruby-rails/config.json](valet-labs/circleci-demo-ruby-rails/config.json)
- [valet-labs/circleci-demo-ruby-rails/source.yml](valet-labs/circleci-demo-ruby-rails/source.yml)
- [actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml](actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml)
- [actions-importer-labs/circleci-demo-ruby-rails/config.json](actions-importer-labs/circleci-demo-ruby-rails/config.json)
- [actions-importer-labs/circleci-demo-ruby-rails/source.yml](actions-importer-labs/circleci-demo-ruby-rails/source.yml)
### Partially successful
#### valet-labs/circleci-node-example
#### actions-importer-labs/circleci-node-example
- [valet-labs/circleci-node-example/.github/workflows/sample.yml](valet-labs/circleci-node-example/.github/workflows/sample.yml)
- [valet-labs/circleci-node-example/config.json](valet-labs/circleci-node-example/config.json)
- [valet-labs/circleci-node-example/source.yml](valet-labs/circleci-node-example/source.yml)
- [actions-importer-labs/circleci-node-example/.github/workflows/sample.yml](actions-importer-labs/circleci-node-example/.github/workflows/sample.yml)
- [actions-importer-labs/circleci-node-example/config.json](actions-importer-labs/circleci-node-example/config.json)
- [actions-importer-labs/circleci-node-example/source.yml](actions-importer-labs/circleci-node-example/source.yml)
```
Each pipeline will have a variety of files written that include:
@@ -200,19 +201,19 @@ Each pipeline will have a variety of files written that include:
```csv
Pipeline,Action,File path
valet-labs/circleci-hello-world,actions/checkout@v2,tmp/audit/valet-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml
valet-labs/circleci-command-example,./.github/actions/greeting,tmp/audit/valet-labs/circleci-command-example/.github/workflows/my-workflow.yml
valet-labs/circleci-node-example,actions/checkout@v2,tmp/audit/valet-labs/circleci-node-example/.github/workflows/sample.yml
valet-labs/circleci-node-example,actions/cache@v2,tmp/audit/valet-labs/circleci-node-example/.github/workflows/sample.yml
valet-labs/circleci-python-example,actions/checkout@v2,tmp/audit/valet-labs/circleci-python-example/.github/workflows/sample.yml
valet-labs/circleci-python-example,actions/cache@v2,tmp/audit/valet-labs/circleci-python-example/.github/workflows/sample.yml
valet-labs/circleci-demo-java-spring,actions/checkout@v2,tmp/audit/valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
valet-labs/circleci-demo-java-spring,actions/cache@v2,tmp/audit/valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
valet-labs/circleci-demo-java-spring,actions/upload-artifact@v2,tmp/audit/valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
valet-labs/circleci-demo-java-spring,actions/download-artifact@v2,tmp/audit/valet-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
valet-labs/circleci-demo-ruby-rails,ruby/setup-ruby@v1,tmp/audit/valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
valet-labs/circleci-demo-ruby-rails,actions/checkout@v2,tmp/audit/valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
valet-labs/circleci-demo-ruby-rails,actions/cache@v2,tmp/audit/valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
actions-importer-labs/circleci-hello-world,actions/checkout@v2,tmp/audit/actions-importer-labs/circleci-hello-world/.github/workflows/say-hello-workflow.yml
actions-importer-labs/circleci-command-example,./.github/actions/greeting,tmp/audit/actions-importer-labs/circleci-command-example/.github/workflows/my-workflow.yml
actions-importer-labs/circleci-node-example,actions/checkout@v2,tmp/audit/actions-importer-labs/circleci-node-example/.github/workflows/sample.yml
actions-importer-labs/circleci-node-example,actions/cache@v2,tmp/audit/actions-importer-labs/circleci-node-example/.github/workflows/sample.yml
actions-importer-labs/circleci-python-example,actions/checkout@v2,tmp/audit/actions-importer-labs/circleci-python-example/.github/workflows/sample.yml
actions-importer-labs/circleci-python-example,actions/cache@v2,tmp/audit/actions-importer-labs/circleci-python-example/.github/workflows/sample.yml
actions-importer-labs/circleci-demo-java-spring,actions/checkout@v2,tmp/audit/actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
actions-importer-labs/circleci-demo-java-spring,actions/cache@v2,tmp/audit/actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
actions-importer-labs/circleci-demo-java-spring,actions/upload-artifact@v2,tmp/audit/actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
actions-importer-labs/circleci-demo-java-spring,actions/download-artifact@v2,tmp/audit/actions-importer-labs/circleci-demo-java-spring/.github/workflows/workflow.yml
actions-importer-labs/circleci-demo-ruby-rails,ruby/setup-ruby@v1,tmp/audit/actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
actions-importer-labs/circleci-demo-ruby-rails,actions/checkout@v2,tmp/audit/actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
actions-importer-labs/circleci-demo-ruby-rails,actions/cache@v2,tmp/audit/actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
Pipeline,Secret,File path
+2 -2
View File
@@ -29,8 +29,8 @@ Answer the following questions before running the `forecast` command:
```console
$ gh actions-importer forecast circle-ci --output-dir tmp/forecast_reports --start-date 2022-09-02
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/valet-20220916-021004.log'
[2022-08-20 22:08:20] Forecasting 'http://app.circleci.com/pipelines/github/valet-labs'
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/actions-importer-20220916-021004.log'
[2022-08-20 22:08:20] Forecasting 'http://app.circleci.com/pipelines/github/actions-importer-labs'
[2022-08-20 22:08:20] Output file(s):
[2022-08-20 22:08:20] tmp/forecast/jobs/09-16-2022-02-10_jobs_0.json
[2022-08-20 22:08:20] tmp/forecast/forecast_report.md
+8 -8
View File
@@ -13,10 +13,10 @@ In this lab you will use the `dry-run` command to convert a CircleCI pipeline to
You will be performing a dry run migration against a CircleCI project. Answer the following questions before running this command:
1. What project do you want to convert?
- __circleci-demo-ruby-rails__. This is one of the sample projects avaiable in the CircleCI valet-labs organization.
- __circleci-demo-ruby-rails__. This is one of the sample projects avaiable in the CircleCI actions-importer-labs organization.
2. Where do you want to store the result?
- __tmp/dry-run__. This can be any path within the working directory that Valet commands are executed from.
- __tmp/dry-run__. This can be any path within the working directory that GitHub Actions Importer commands are executed from.
### Steps
@@ -30,14 +30,14 @@ You will be performing a dry run migration against a CircleCI project. Answer th
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh actions-importer dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-demo-ruby-rails --circle-ci-organization valet-labs
[2022-09-19 19:46:03] Logs: 'tmp/dry-run/log/valet-20220919-194603.log'
$ gh actions-importer dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-demo-ruby-rails --circle-ci-organization actions-importer-labs
[2022-09-19 19:46:03] Logs: 'tmp/dry-run/log/actions-importer-20220919-194603.log'
[2022-09-19 19:46:05] Output file(s):
[2022-09-19 19:46:05] tmp/dry-run/valet-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
[2022-09-19 19:46:05] tmp/dry-run/actions-importer-labs/circleci-demo-ruby-rails/.github/workflows/build_and_test.yml
```
4. View the converted workflow:
- Find `tmp/dry-run/valet-labs/circleci-demo-ruby-rails/.github/workflows` in the file explorer pane in your codespace.
- Find `tmp/dry-run/actions-importer-labs/circleci-demo-ruby-rails/.github/workflows` in the file explorer pane in your codespace.
- Click `build_and_test.yml` to open.
## Inspect the output files
@@ -114,7 +114,7 @@ workflows:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-labs/circleci-demo-ruby-rails/build_and_test
name: actions-importer-labs/circleci-demo-ruby-rails/build_and_test
on:
push:
branches:
@@ -194,4 +194,4 @@ Despite these two pipelines using different syntax they will function equivalent
## 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)
+5 -5
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.
@@ -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-labs/circleci-node-example/sample
name: actions-importer-labs/circleci-node-example/sample
on:
push:
branches:
@@ -98,7 +98,7 @@ transform "codecov_codecov_upload" do |_item|
end
```
This 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 CircleCI.
This 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 CircleCI.
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:
@@ -187,7 +187,7 @@ end
</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
+2 -2
View File
@@ -31,7 +31,7 @@ Answer the following questions before running a `migrate` command:
```console
$ gh actions-importer migrate circle-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --circle-ci-project circleci-hello-world
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/valet-20220916-014033.log'
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/actions-importer-20220916-014033.log'
[2022-08-20 22:08:20] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
@@ -51,4 +51,4 @@ At this point, the migration has completed and you have successfully migrated a
### Next Lab
This concludes all labs for migrating CircleCI pipelines to Actions with Valet!
This concludes all labs for migrating CircleCI pipelines to Actions with GitHub Actions Importer!
+16 -16
View File
@@ -1,12 +1,12 @@
# CircleCI to Actions migrations powered by Valet
# CircleCI to Actions 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 Valet to migrate CircleCI pipelines to GitHub Actions.
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.
These steps **must** be completed prior to starting other labs.
## Create your own repository for these labs
1. Ensure that you have created a repository using the [valet-customers/labs](https://github.com/valet-customers/labs) as a template.
1. Ensure that you have created a repository using the [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's terminal:
@@ -30,45 +30,45 @@ 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, refer to the troubleshooting [guide](#troubleshoot-the-valet-cli).
- If `gh actions-importer version` did not produce similar output, refer to the troubleshooting [guide](#troubleshoot-the-actions-importer/cli).
## Labs for CircleCI
Perform the following labs to test-drive Valet
Perform the following labs to learn how to migrate CircleCI pipelines to GitHub Actions using 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 of CircleCI](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run of a CircleCI 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 CircleCI 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's 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, 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 Valet CLI extension is installed and working by running the following command from the codespace's terminal:
- Verify GitHub Actions Importer CLI extension is installed and working by running the following command from the codespace's terminal:
```bash
gh actions-importer version
+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
+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 Jenkins 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 Jenkins and GitHub.
You will need to complete all of the setup instructions [here](./readme.md#configure-your-codespace) prior to performing this lab.
@@ -58,7 +58,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:
@@ -66,12 +66,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
@@ -79,4 +79,4 @@ To verify your environment is configured correctly, run the `update` CLI command
### Next lab
[Perform an audit of a Jenkins server](2-audit.md#perform-an-audit-of-a-jenkins-server)
[Perform an audit of a Jenkins server](2-audit.md)
+11 -9
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 Jenkins server.
The `audit` command will perform the following steps:
1. Fetch all of the projects defined in a Jenkins server.
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
@@ -20,7 +21,7 @@ You will be performing an audit against your preconfigured Jenkins server. Answe
- In this example you will audit the entire Jenkins instance, but in the future if you wanted to configure a specific folder to be audited add the `-f <folder_path>` flag 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
@@ -35,7 +36,7 @@ You will be performing an audit against your preconfigured Jenkins server. Answe
```console
$ gh actions-importer audit jenkins --output-dir tmp/audit
[2022-08-20 22:08:20] Logs: 'tmp/audit/log/valet-20220916-015817.log'
[2022-08-20 22:08:20] Logs: 'tmp/audit/log/actions-importer-20220916-015817.log'
[2022-08-20 22:08:20] Auditing 'http://localhost:8080/'
[2022-08-20 22:08:20] Output file(s):==========================================|
[2022-09-28 20:08:48] tmp/audit/demo_pipeline/.github/workflows/demo_pipeline.yml
@@ -70,7 +71,7 @@ The audit summary, logs, config files, jenkinsfiles, and transformed workflows w
#### 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
@@ -99,20 +100,20 @@ 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. The following Jenkins pipeline types are supported:
- __Unsupported__ pipelines are definition types that are not supported by GitHub Actions Importer. The following Jenkins pipeline types are supported:
- Flow Definition
- Project (declarative Jenkinsfile pipelines)
- Multibranch Project
- __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 Jenkins.
- 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
@@ -159,7 +160,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
@@ -265,6 +266,7 @@ Each pipeline will have a variety of files written that include:
```
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?
+1 -1
View File
@@ -33,7 +33,7 @@ Answer the following questions before running the `forecast` command:
```console
$ gh actions-importer forecast jenkins --output-dir tmp/forecast --start-date 2022-08-02
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/valet-20220916-021004.log'
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/actions-importer-20220916-021004.log'
[2022-08-20 22:08:20] Forecasting 'http://localhost:8080/'
[2022-08-20 22:08:20] Output file(s):
[2022-08-20 22:08:20] tmp/forecast/jobs/09-16-2022-02-10_jobs_0.json
+4 -4
View File
@@ -19,7 +19,7 @@ You will be performing a dry run against a pipeline in your preconfigured Jenkin
- __<http://localhost:8080/job/test_pipeline>__
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
@@ -34,7 +34,7 @@ You will be performing a dry run against a pipeline in your preconfigured Jenkin
```console
$ gh actions-importer dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
[2022-09-28 20:12:00] Logs: 'tmp/dry-run/log/valet-20220928-201200.log'
[2022-09-28 20:12:00] Logs: 'tmp/dry-run/log/actions-importer-20220928-201200.log'
[2022-09-28 20:12:00] Output file(s):
[2022-09-28 20:12:00] tmp/dry-run/test_pipeline/.github/workflows/test_pipeline.yml
```
@@ -140,10 +140,10 @@ These two pipelines function equivalently despite using different syntax. In thi
+ # value: 80
```
In the next lab, you'll learn how to override Valet's default behavior and customize the converted workflow that is generated.
In the next lab, you'll learn how to override GitHub Actions Importer's default behavior and customize the converted workflow that is generated.
Try running the `dry-run` command for different pipelines in the Jenkins server. As a hint, you only have to change the `--source-url` CLI option.
## 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)
+6 -6
View File
@@ -1,6 +1,6 @@
# Use custom transformers to customize Valet's behavior
# Use 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.
@@ -109,7 +109,7 @@ transform "sleep" do |item|
end
```
This 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 Jenkins.
This 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 Jenkins.
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:
@@ -133,7 +133,7 @@ Open the workflow that is generated and inspect the contents. Now the `sleep` st
## Custom transformers for a known step
You can also override Valet's default behavior. In this scenario, you may not want to use the third-party action for publishing junit test results that is used by default. Again, answer the following questions before writing a custom transformer:
You can also override GitHub Actions Importer's default behavior. In this scenario, you may not want to use the third-party action for publishing junit test results that is used by default. Again, answer the following questions before writing a custom transformer:
1. What is the "identifier" of the step to customize?
- __junit__
@@ -162,7 +162,7 @@ Now, we can perform another `dry-run` command with the `--custom-transformers` C
```console
$ gh actions-importer dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run --custom-transformers transformers.rb
[2022-08-20 22:08:20] Logs: 'tmp/dry-run/log/valet-20220916-022628.log'
[2022-08-20 22:08:20] Logs: 'tmp/dry-run/log/actions-importer-20220916-022628.log'
This is the item: {"name"=>"junit", "arguments"=>[{"key"=>"testResults", "value"=>{"isLiteral"=>true, "value"=>"**/target/*.xml"}}]}
[2022-08-20 22:08:20] Output file(s):
[2022-08-20 22:08:20] tmp/dry-run/test_pipeline/.github/workflows/test_pipeline.yml
@@ -287,7 +287,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
- Known steps
+2 -2
View File
@@ -31,7 +31,7 @@ Answer the following questions before running a `migrate` command:
```console
$ gh actions-importer migrate jenkins --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --source-url http://localhost:8080/job/monas_dev_work/job/monas_freestyle
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/valet-20220916-014033.log'
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/actions-importer-20220916-014033.log'
[2022-08-20 22:08:20] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
@@ -53,4 +53,4 @@ At this point, the migration has completed and you have successfully migrated a
### Next lab
This concludes all labs for migrating Jenkins pipelines to Actions with Valet!
This concludes all labs for migrating Jenkins pipelines to Actions with GitHub Actions Importer!
@@ -19,7 +19,7 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>echo &quot;hello valet!&quot;
<command>echo &quot;hello GitHub Actions Importer!&quot;
sleep 70</command>
<configuredLocalRules/>
</hudson.tasks.Shell>
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
container_name="valet"
container_name="actions-importer"
username="admin"
password="password"
+19 -19
View File
@@ -1,12 +1,12 @@
# Jenkins to Actions migrations powered by Valet
# Jenkins to Actions migrations powered by GitHub Actions Importer
These instructions will guide you through configuring a GitHub Codespaces environment that will be used in subsequent labs that demonstrate how to use Valet to migrate Jenkins pipelines to GitHub Actions.
These instructions will guide you through configuring a GitHub Codespaces environment that will be used in subsequent labs that demonstrate how to use GitHub Actions Importer to migrate Jenkins pipelines to GitHub Actions.
These steps **must** be completed prior to starting other labs.
## Create your own repository for these labs
1. Ensure that you have created a repository using the [valet-customers/labs](https://github.com/valet-customers/labs) as a template.
1. Ensure that you have created a repository using the [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's 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, refer to the troubleshooting [guide](#troubleshoot-the-valet-cli).
- If `gh actions-importer version` did not produce similar output, refer to the troubleshooting [guide](#troubleshoot-the-actions-importer/cli).
## Bootstrap a Jenkins server
@@ -59,37 +59,37 @@ These steps **must** be completed prior to starting other labs.
## Labs for Jenkins
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 of a Jenkins server](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run migration of a Jenkins 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 Jenkins 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, 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 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
@@ -100,9 +100,9 @@ The CLI extension for Valet can be manually installed by following these steps:
Follow these steps if the Jenkins server does not start correctly after running the setup script:
1. On the left side of the codespace, navigate to the `Docker` tab.
2. Under the `Containers` tab you should see a docker container named `jenkins:valet` listed with a green play button ▶
2. Under the `Containers` tab you should see a docker container named `jenkins:actions-importer` listed with a green play button ▶
- If you see the `jenkins:valet` container, but it has a red stopped symbol next to it ▢, right-click the container and click `start`. The container should begin running again.
- If the container does not start even after trying to start it manually, right-click the `jenkins:valet` container and click the `remove` button. Then, attempt to start the Jenkins server again by following the steps [here](#bootstrap-a-jenkins-server).
- If you see the `jenkins:actions-importer` container, but it has a red stopped symbol next to it ▢, right-click the container and click `start`. The container should begin running again.
- If the container does not start even after trying to start it manually, right-click the `jenkins:actions-importer` container and click the `remove` button. Then, attempt to start the Jenkins server again by following the steps [here](#bootstrap-a-jenkins-server).
![img](https://user-images.githubusercontent.com/19557880/183770210-c0386616-656e-4fe9-9324-b410ad62c406.png)
+7 -7
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 Travis CI 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 Travis CI and GitHub.
You will need to complete all of the setup instructions [here](./readme.md#configure-your-codespace) prior to performing this lab.
@@ -34,7 +34,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the GitHub URL prompt, enter the GitHub instance URL or press enter to accept the default value (`https://github.com`).
- At the Travis CI token prompt, enter the Travis CI access token from step 2 and press enter.
- At the Travis CI base url prompt, hit enter to accept the default value (`https://travis-ci.com`).
- At the Travis CI organization name, enter `valet-labs`.
- At the Travis CI organization name, enter `actions-importer-labs`.
```console
$ gh actions-importer configure
@@ -46,13 +46,13 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
✔ Base url of the GitHub instance: https://github.com
✔ Personal access token for Travis CI: ***************
✔ Base url of the Travis CI instance: https://travis-ci.com
✔ Travis CI organization name: valet-labs
✔ Travis CI organization name: actions-importer-labs
Environment variables successfully updated.
```
## 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 Valet to your codespace.
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.
1. In the codespace terminal run the following command:
@@ -60,12 +60,12 @@ To verify our environment is configured correctly, we are going to run the `upda
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
+62 -61
View File
@@ -6,19 +6,19 @@ The `audit` command operates by performing the following:
- Fetching all of the projects defined in a Travis CI organization.
- Converting each to their equivalent GitHub Actions workflow.
- Generating a report that summarizes how complete and complex of a migration is possible with Valet.
- Generating a report that summarizes how complete and complex of a migration is possible with GitHub Actions Importer.
## Prerequisites
1. Followed the steps [here](./readme.md#configure-your-codespace) to set up your Codespace environment.
2. Completed the [configure lab](./1-configure.md#configure-credentials-for-valet).
2. Completed the [configure lab](./1-configure.md).
## Perform an audit
You will be performing an audit against the **valet-labs** Travis CI organization that was created for the purposes of this lab. Your environment was configured to use this organization during the [configure lab](./1-configure.md). The remaining information needed to perform an `audit` is:
You will be performing an audit against the **actions-importer-labs** Travis CI organization that was created for the purposes of this lab. 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?
- **tmp/audit**. This can be any path within the working directory that Valet commands are executed from.
- **tmp/audit**. This can be any path within the working directory that GitHub Actions Importer commands are executed from.
### Steps
@@ -41,14 +41,14 @@ You will be performing an audit against the **valet-labs** Travis CI organizatio
#### 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
# Audit summary
Summary for [Travis CI instance](https://travis-ci.com/valet-labs)
Summary for [Travis CI instance](https://travis-ci.com/actions-importer-labs)
- Valet version: **0.1.0.13539 (5bb6c723d6db3688ea0653e14bbf3c63df445bfc)**
- GitHub Actions Importer version: **0.1.0.13539 (5bb6c723d6db3688ea0653e14bbf3c63df445bfc)**
- Performed at: **9/16/22 at 20:01**
## Pipelines
@@ -160,35 +160,35 @@ Secrets: **1**
### Partially successful
#### valet-labs/travisci-php-example
#### actions-importer-labs/travisci-php-example
- [valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml](valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml)
- [valet-labs/travisci-php-example/config.json](valet-labs/travisci-php-example/config.json)
- [valet-labs/travisci-php-example/source.yml](valet-labs/travisci-php-example/source.yml)
- [actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml](actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml)
- [actions-importer-labs/travisci-php-example/config.json](actions-importer-labs/travisci-php-example/config.json)
- [actions-importer-labs/travisci-php-example/source.yml](actions-importer-labs/travisci-php-example/source.yml)
#### valet-labs/travisci-nodejs-example
#### actions-importer-labs/travisci-nodejs-example
- [valet-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml](valet-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml)
- [valet-labs/travisci-nodejs-example/config.json](valet-labs/travisci-nodejs-example/config.json)
- [valet-labs/travisci-nodejs-example/source.yml](valet-labs/travisci-nodejs-example/source.yml)
- [actions-importer-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml](actions-importer-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml)
- [actions-importer-labs/travisci-nodejs-example/config.json](actions-importer-labs/travisci-nodejs-example/config.json)
- [actions-importer-labs/travisci-nodejs-example/source.yml](actions-importer-labs/travisci-nodejs-example/source.yml)
#### valet-labs/travisci-ruby-example
#### actions-importer-labs/travisci-ruby-example
- [valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml](valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml)
- [valet-labs/travisci-ruby-example/config.json](valet-labs/travisci-ruby-example/config.json)
- [valet-labs/travisci-ruby-example/source.yml](valet-labs/travisci-ruby-example/source.yml)
- [actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml](actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml)
- [actions-importer-labs/travisci-ruby-example/config.json](actions-importer-labs/travisci-ruby-example/config.json)
- [actions-importer-labs/travisci-ruby-example/source.yml](actions-importer-labs/travisci-ruby-example/source.yml)
#### valet-labs/travisci-python-example
#### actions-importer-labs/travisci-python-example
- [valet-labs/travisci-python-example/.github/workflows/travisci-python-example.yml](valet-labs/travisci-python-example/.github/workflows/travisci-python-example.yml)
- [valet-labs/travisci-python-example/config.json](valet-labs/travisci-python-example/config.json)
- [valet-labs/travisci-python-example/source.yml](valet-labs/travisci-python-example/source.yml)
- [actions-importer-labs/travisci-python-example/.github/workflows/travisci-python-example.yml](actions-importer-labs/travisci-python-example/.github/workflows/travisci-python-example.yml)
- [actions-importer-labs/travisci-python-example/config.json](actions-importer-labs/travisci-python-example/config.json)
- [actions-importer-labs/travisci-python-example/source.yml](actions-importer-labs/travisci-python-example/source.yml)
#### valet-labs/travisci-deploy-example
#### actions-importer-labs/travisci-deploy-example
- [valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml](valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml)
- [valet-labs/travisci-deploy-example/config.json](valet-labs/travisci-deploy-example/config.json)
- [valet-labs/travisci-deploy-example/source.yml](valet-labs/travisci-deploy-example/source.yml)
- [actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml](actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml)
- [actions-importer-labs/travisci-deploy-example/config.json](actions-importer-labs/travisci-deploy-example/config.json)
- [actions-importer-labs/travisci-deploy-example/source.yml](actions-importer-labs/travisci-deploy-example/source.yml)
```
Here are some key terms that can appear in the “Pipelines” section:
@@ -197,14 +197,14 @@ Here are some key terms that can appear in the “Pipelines” section:
- **Partially successful** pipelines had 100% of all of the pipeline constructs converted, however, there were some individual items that were not converted automatically to their GitHub Actions equivalent.
- **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 Travis CI.
- 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
Total: **25**
@@ -254,7 +254,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
@@ -278,35 +278,35 @@ The final section of the audit report provides a manifest of all of the files th
```md
### Partially successful
#### valet-labs/travisci-php-example
#### actions-importer-labs/travisci-php-example
- [valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml](valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml)
- [valet-labs/travisci-php-example/config.json](valet-labs/travisci-php-example/config.json)
- [valet-labs/travisci-php-example/source.yml](valet-labs/travisci-php-example/source.yml)
- [actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml](actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml)
- [actions-importer-labs/travisci-php-example/config.json](actions-importer-labs/travisci-php-example/config.json)
- [actions-importer-labs/travisci-php-example/source.yml](actions-importer-labs/travisci-php-example/source.yml)
#### valet-labs/travisci-nodejs-example
#### actions-importer-labs/travisci-nodejs-example
- [valet-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml](valet-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml)
- [valet-labs/travisci-nodejs-example/config.json](valet-labs/travisci-nodejs-example/config.json)
- [valet-labs/travisci-nodejs-example/source.yml](valet-labs/travisci-nodejs-example/source.yml)
- [actions-importer-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml](actions-importer-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml)
- [actions-importer-labs/travisci-nodejs-example/config.json](actions-importer-labs/travisci-nodejs-example/config.json)
- [actions-importer-labs/travisci-nodejs-example/source.yml](actions-importer-labs/travisci-nodejs-example/source.yml)
#### valet-labs/travisci-ruby-example
#### actions-importer-labs/travisci-ruby-example
- [valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml](valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml)
- [valet-labs/travisci-ruby-example/config.json](valet-labs/travisci-ruby-example/config.json)
- [valet-labs/travisci-ruby-example/source.yml](valet-labs/travisci-ruby-example/source.yml)
- [actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml](actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml)
- [actions-importer-labs/travisci-ruby-example/config.json](actions-importer-labs/travisci-ruby-example/config.json)
- [actions-importer-labs/travisci-ruby-example/source.yml](actions-importer-labs/travisci-ruby-example/source.yml)
#### valet-labs/travisci-python-example
#### actions-importer-labs/travisci-python-example
- [valet-labs/travisci-python-example/.github/workflows/travisci-python-example.yml](valet-labs/travisci-python-example/.github/workflows/travisci-python-example.yml)
- [valet-labs/travisci-python-example/config.json](valet-labs/travisci-python-example/config.json)
- [valet-labs/travisci-python-example/source.yml](valet-labs/travisci-python-example/source.yml)
- [actions-importer-labs/travisci-python-example/.github/workflows/travisci-python-example.yml](actions-importer-labs/travisci-python-example/.github/workflows/travisci-python-example.yml)
- [actions-importer-labs/travisci-python-example/config.json](actions-importer-labs/travisci-python-example/config.json)
- [actions-importer-labs/travisci-python-example/source.yml](actions-importer-labs/travisci-python-example/source.yml)
#### valet-labs/travisci-deploy-example
#### actions-importer-labs/travisci-deploy-example
- [valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml](valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml)
- [valet-labs/travisci-deploy-example/config.json](valet-labs/travisci-deploy-example/config.json)
- [valet-labs/travisci-deploy-example/source.yml](valet-labs/travisci-deploy-example/source.yml)
- [actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml](actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml)
- [actions-importer-labs/travisci-deploy-example/config.json](actions-importer-labs/travisci-deploy-example/config.json)
- [actions-importer-labs/travisci-deploy-example/source.yml](actions-importer-labs/travisci-deploy-example/source.yml)
```
Each pipeline will have a variety of files written that include:
@@ -323,23 +323,24 @@ Each pipeline will have a variety of files written that include:
```csv
Pipeline,Action,File path
valet-labs/travisci-php-example,actions/checkout@v2,tmp/audit/valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
valet-labs/travisci-php-example,shivammathur/setup-php@v2,tmp/audit/valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
valet-labs/travisci-php-example,rectalogic/notify-irc@v1,tmp/audit/valet-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
valet-labs/travisci-nodejs-example,actions/checkout@v2,tmp/audit/valet-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml
valet-labs/travisci-ruby-example,actions/checkout@v2,tmp/audit/valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
valet-labs/travisci-ruby-example,ruby/setup-ruby@v1,tmp/audit/valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
valet-labs/travisci-python-example,actions/checkout@v2,tmp/audit/valet-labs/travisci-python-example/.github/workflows/travisci-python-example.yml
valet-labs/travisci-deploy-example,actions/checkout@v2,tmp/audit/valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml
valet-labs/travisci-deploy-example,desiderati/github-action-pushover@v1,tmp/audit/valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml
actions-importer-labs/travisci-php-example,actions/checkout@v2,tmp/audit/actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
actions-importer-labs/travisci-php-example,shivammathur/setup-php@v2,tmp/audit/actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
actions-importer-labs/travisci-php-example,rectalogic/notify-irc@v1,tmp/audit/actions-importer-labs/travisci-php-example/.github/workflows/travisci-php-example.yml
actions-importer-labs/travisci-nodejs-example,actions/checkout@v2,tmp/audit/actions-importer-labs/travisci-nodejs-example/.github/workflows/travisci-nodejs-example.yml
actions-importer-labs/travisci-ruby-example,actions/checkout@v2,tmp/audit/actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
actions-importer-labs/travisci-ruby-example,ruby/setup-ruby@v1,tmp/audit/actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
actions-importer-labs/travisci-python-example,actions/checkout@v2,tmp/audit/actions-importer-labs/travisci-python-example/.github/workflows/travisci-python-example.yml
actions-importer-labs/travisci-deploy-example,actions/checkout@v2,tmp/audit/actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml
actions-importer-labs/travisci-deploy-example,desiderati/github-action-pushover@v1,tmp/audit/actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml
Pipeline,Secret,File path
valet-labs/travisci-deploy-example,${{ secrets.PUSHOVER_USER_KEY }},tmp/audit/valet-labs/travisci-deploy-example/.github/workflows/travisci-deploy-example.yml
actions-importer-labs/travisci-deploy-example,${{ secrets.PUSHOVER_USER_KEY }},tmp/audit/actions-importer-labs/travisci-deploy-example/.github/workflows/travisci-deploy-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
@@ -29,8 +29,8 @@ Answer the following questions before running the `forecast` command:
```console
$ gh actions-importer forecast travis-ci --output-dir tmp/forecast --start-date 2022-09-02
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/valet-20220916-021004.log'
[2022-08-20 22:08:20] Forecasting 'http://travis-ci.com/valet-labs'
[2022-08-20 22:08:20] Logs: 'tmp/forecast/log/actions-importer-20220916-021004.log'
[2022-08-20 22:08:20] Forecasting 'http://travis-ci.com/actions-importer-labs'
[2022-08-20 22:08:20] Output file(s):
[2022-08-20 22:08:20] tmp/forecast/jobs/09-16-2022-02-10_jobs_0.json
[2022-08-20 22:08:20] tmp/forecast/forecast_report.md
+12 -12
View File
@@ -1,6 +1,6 @@
# Perform a dry-run of a TravisCI pipeline
# Perform a dry-run of a Travis CI pipeline
In this lab you will use the `dry-run` command to convert a TravisCI pipeline to its equivalent GitHub Actions workflow.
In this lab you will use the `dry-run` command to convert a Travis CI pipeline to its equivalent GitHub Actions workflow.
## Prerequisites
@@ -10,13 +10,13 @@ In this lab you will use the `dry-run` command to convert a TravisCI pipeline to
## Perform a dry run
You will be performing a dry-run against a TravisCI project. Answer the following questions before running this command:
You will be performing a dry-run against a Travis CI project. Answer the following questions before running this command:
1. What pipeline do you want to convert?
- __travisci-ruby-example__. This is one of the sample projects avaiable in the TravisCI labs-data organization.
- __travisci-ruby-example__. This is one of the sample projects available in the `actions-importer-labs` organization.
2. Where do you want to store the result?
- __tmp/dry-run__. This can be any path within the working directory that Valet commands are executed from.
- __tmp/dry-run__. This can be any path within the working directory that GitHub Actions Importer commands are executed from.
### Steps
@@ -31,21 +31,21 @@ You will be performing a dry-run against a TravisCI project. Answer the followin
```console
$ gh actions-importer dry-run travis-ci --travis-ci-repository "travisci-ruby-example" --output-dir tmp/dry-run
[2022-09-19 19:46:03] Logs: 'tmp/dry-run/log/valet-20220919-194603.log'
[2022-09-19 19:46:03] Logs: 'tmp/dry-run/log/actions-importer-20220919-194603.log'
[2022-09-19 19:46:05] Output file(s):
[2022-09-19 19:46:05] tmp/dry-run/valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
[2022-09-19 19:46:05] tmp/dry-run/actions-importer-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
```
4. View the converted workflow:
- Find `tmp/dry-run/valet-labs/travisci-ruby-example/.github/workflows` in the file explorer pane in your codespace.
- Find `tmp/dry-run/actions-importer-labs/travisci-ruby-example/.github/workflows` in the file explorer pane in your codespace.
- Click `travisci-ruby-example.yml` to open.
## Inspect the output files
The files generated from the `dry-run` command represent the equivalent Actions workflow for the TravisCI project. The TravisCI configuration and converted workflow can be seen below:
The files generated from the `dry-run` command represent the equivalent Actions workflow for the Travis CI project. The Travis CI configuration and converted workflow can be seen below:
<details>
<summary><em>TravisCI configuration 👇</em></summary>
<summary><em>Travis CI configuration 👇</em></summary>
```yaml
language: ruby
@@ -73,7 +73,7 @@ The files generated from the `dry-run` command represent the equivalent Actions
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-labs/travisci-ruby-example
name: actions-importer-labs/travisci-ruby-example
on:
push:
branches:
@@ -121,4 +121,4 @@ Despite these two pipelines using different syntax they will function equivalent
## 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)
+6 -6
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.
@@ -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-labs/travisci-deploy-example
name: actions-importer-labs/travisci-deploy-example
on:
push:
branches:
@@ -121,7 +121,7 @@ transform "codedeploy" do |_item|
end
```
This method can use any valid ruby syntax and should return a `Hash`, or an array of `Hashes` that represent 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 Travis CI.
This method can use any valid ruby syntax and should return a `Hash`, or an array of `Hashes` that represent 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 Travis CI.
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:
@@ -237,7 +237,7 @@ runner "linux", ["new-runner", "self-hosted"]
</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
@@ -245,4 +245,4 @@ That's it! Congratulations, you have overridden Valet's default behavior by cust
## Next lab
[Perform a production migration of a Travis CI pipeline](5-migrate.md)
[Perform a production migration of a Travis CI pipeline](6-migrate.md)
+2 -2
View File
@@ -31,7 +31,7 @@ Answer the following questions before running a `migrate` command:
```console
$ gh actions-importer migrate travis-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --travis-ci-repository "travisci-deploy-example"
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/valet-20220916-014033.log'
[2022-08-20 22:08:20] Logs: 'tmp/migrate/log/actions-importer-20220916-014033.log'
[2022-08-20 22:08:20] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
@@ -51,4 +51,4 @@ At this point, the migration has completed and you have successfully migrated a
## Next steps
This concludes all labs for migrating Travis CI pipelines to Actions with Valet!
This concludes all labs for migrating Travis CI pipelines to Actions with GitHub Actions Importer!
+16 -16
View File
@@ -1,12 +1,12 @@
# Travis CI to Actions migrations powered by Valet
# Travis CI to Actions 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 Valet to migrate Travis CI pipelines to GitHub Actions.
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 Travis CI pipelines to GitHub Actions.
These steps **must** be completed prior to starting other labs.
## Create your own repository for these labs
1. Ensure that you have created a repository using the [valet-customers/labs](https://github.com/valet-customers/labs) as a template.
1. Ensure that you have created a repository using the [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's terminal:
@@ -30,45 +30,45 @@ 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 then please follow the troubleshooting [guide](#troubleshoot-the-valet-cli).
- If `gh actions-importer version` did not produce similar output then please follow the troubleshooting [guide](#troubleshoot-the-actions-importer/cli).
## Labs for Travis CI
Perform the following labs to test-drive Valet
Perform the following labs to learn more about GitHub 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 of Travis CI](2-audit.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run of a Travis CI 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 Travis CI 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's 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, 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 Valet CLI extension is installed and working by running the following command from the codespace's terminal:
- Verify GitHub Actions Importer CLI extension is installed and working by running the following command from the codespace's terminal:
```bash
gh actions-importer version