Start renaming

This commit is contained in:
Ethan Dennis
2022-11-02 21:02:30 -07:00
parent 8256b24f94
commit bf4550c865
39 changed files with 123 additions and 136 deletions
+2 -15
View File
@@ -1,18 +1,5 @@
{
"name": "Codespace to perform Valet Labs",
"image": "mcr.microsoft.com/vscode/devcontainers/universal:linux",
"remoteUser": "codespace",
"overrideCommand": false,
"mounts": [
"source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume"
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--privileged",
"--init"
],
"name": "Codespace to perform GitHub Actions Importer Labs",
"remoteEnv": {
"DOCKER_ARGS": "--network=host",
"INSTALLATION_TYPE": "labs"
@@ -28,5 +15,5 @@
]
}
},
"postCreateCommand": "gh extension install github/gh-valet || echo 'Could not auto-build. Skipping.' "
"postCreateCommand": "gh extension install github/gh-actions-importer || echo 'Could not auto-build. Skipping.' "
}
+1 -1
View File
@@ -1 +1 @@
* @valet-customers/reviewers
* @actions/importer
+6 -6
View File
@@ -38,7 +38,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
3. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal.
- Run the following command: `gh valet configure`.
- Run the following command: `gh actions-importer configure`.
- Use the down arrow key to highlight `Azure DevOps`, press the spacebar to select, and then press enter to continue.
- At the GitHub handle prompt, enter the GitHub handle used to generate the GitHub PAT in step 2 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 2 and press enter.
@@ -50,7 +50,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the prompt, enter your Azure DevOps project name. This should be the same project name used in the setup steps [here](./readme.md#bootstrap-your-azure-devops-organization).
```console
$ gh valet configure
$ gh actions-importer configure
✔ Which CI providers are you configuring?: Azure DevOps
Enter the following values (leave empty to omit):
✔ GitHub handle used to authenticate with the GitHub Container Registry: mona
@@ -71,18 +71,18 @@ To verify our environment is configured correctly, run the `update` CLI command.
1. In the codespace terminal, run the following command:
```bash
gh valet update
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.
```console
$ gh valet update
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest
ghcr.io/valet-customers/valet-cli:latest
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
```
### Next lab
+1 -1
View File
@@ -31,7 +31,7 @@ You will now perform an audit against the bootstrapped Azure DevOps project. Ans
2. Run the following command from the root directory:
```bash
gh valet audit azure-devops --output-dir tmp/audit
gh actions-importer audit azure-devops --output-dir tmp/audit
```
__Note__: The Azure DevOps organization and project name can be omitted from the `audit` command because they were persisted in the `.env.local` file in the [configure lab](./1-configure.md). You can optionally provide these arguments on the command line with the `--azure-devops-organization` and `--azure-devops-project` CLI options.
+3 -3
View File
@@ -26,7 +26,7 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh valet forecast azure-devops --output-dir tmp/forecast
gh actions-importer forecast azure-devops --output-dir tmp/forecast
```
__Note__: The Azure DevOps organization and project name can be omitted from the `forecast` command because they were persisted in the `.env.local` file in the [configure lab](./1-configure.md). You can optionally provide these arguments on the command line with the `--azure-devops-organization` and `--azure-devops-project` CLI options.
@@ -35,14 +35,14 @@ Answer the following questions before running the `forecast` command:
![img](https://user-images.githubusercontent.com/18723510/187690315-6312088d-9888-4c55-9bbf-c6f2687fa547.png)
4. If you inspect the help menu using the `gh valet forecast --help` command, you will see a `--source-file-path` option. You can use this option to perform a `forecast` using json files that are already present on the filesystem. These labs come bundled with sample json files located [here](./bootstrap/jobs.json).
4. If you inspect the help menu using the `gh actions-importer forecast --help` command, you will see a `--source-file-path` option. You can use this option to perform a `forecast` using json files that are already present on the filesystem. These labs come bundled with sample json files located [here](./bootstrap/jobs.json).
![img](https://user-images.githubusercontent.com/18723510/187692843-623d4bdc-8970-4348-a632-73c8b00a40f8.png)
5. Run the following `forecast` command while specifying the path to the sample json files:
```bash
gh valet forecast azure-devops --output-dir tmp/forecast --source-file-path azure_devops/bootstrap/jobs.json
gh actions-importer forecast azure-devops --output-dir tmp/forecast --source-file-path azure_devops/bootstrap/jobs.json
```
6. The command will list all the files written to disk when the command succeeds.
+1 -1
View File
@@ -27,7 +27,7 @@ You will perform a dry run for a pipeline in the bootstrapped Azure DevOps proje
2. Run the following command from the root directory:
```bash
gh valet dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run
gh actions-importer dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run
```
3. The command will list all the files written to disk when the command succeeds.
+3 -3
View File
@@ -33,7 +33,7 @@ You will perform a dry-run for a pipeline in the bootstrapped Azure DevOps proje
2. Run the following command from the root directory:
```bash
gh valet dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run
gh actions-importer dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run
```
3. The command will list all the files written to disk when the command succeeds.
@@ -115,7 +115,7 @@ The `transform` method can use any valid ruby syntax and should return a `Hash`
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 valet dry-run azure-devops pipeline --pipeline-id 6 --output-dir tmp/dry-run --custom-transformers transformers.rb
$ 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'
This is the item: {"command"=>"restore", "projects"=>"$(BuildParameters.RESTOREBUILDPROJECTS)"}
This is the item: {"projects"=>"$(BuildParameters.RESTOREBUILDPROJECTS)", "arguments"=>"--configuration $(BUILDCONFIGURATION)"}
@@ -150,7 +150,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 valet dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run --custom-transformers transformers.rb
gh actions-importer dry-run azure-devops pipeline --pipeline-id :pipeline_id --output-dir tmp/dry-run --custom-transformers transformers.rb
```
Open the workflow that is generated and inspect the contents. Now the `DotnetCoreCLI@2` steps are converted using the customized behavior!
+2 -2
View File
@@ -27,13 +27,13 @@ Answer the following questions before running a `migrate` command:
1. Run the following `migrate` command in the codespace terminal:
```bash
gh valet migrate azure-devops pipeline --pipeline-id :pipeline_id --target-url https://github.com/:owner/:repo --output-dir tmp/migrate
gh actions-importer migrate azure-devops pipeline --pipeline-id :pipeline_id --target-url https://github.com/:owner/:repo --output-dir tmp/migrate
```
2. The command will write the URL to the pull request that was created when the command succeeds.
```console
$ gh valet migrate azure-devops pipeline --pipeline-id 8 --target-url https://github.com/ethanis/labs --output-dir tmp/migrate
$ 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:13] Pull request: 'https://github.com/ethanis/labs/pull/42'
```
+5 -5
View File
@@ -22,19 +22,19 @@ These steps **must** be completed prior to starting other labs.
- Run the following command in the codespace terminal:
```bash
gh valet version
gh actions-importer version
```
- Verify the output is similar to below.
```console
$ gh valet version
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh valet github/gh-valet v0.1.12
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
```
- If `gh valet 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-valet-cli).
## Bootstrap your Azure DevOps organization
@@ -107,5 +107,5 @@ The CLI extension for Valet can be manually installed by following these steps:
- Verify Valet CLI extension is installed and working by running the following command from the codespace terminal:
```bash
gh valet version
gh actions-importer version
```
+6 -6
View File
@@ -20,7 +20,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
2. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal window.
- Run the following command: `gh valet configure`.
- Run the following command: `gh actions-importer configure`.
- Using the down arrow key to highlight `CircleCI`, press the spacebar to select, and then hit enter to continue.
- At the GitHub handle prompt, enter the GitHub username used to generate the GitHub PAT in step 2 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 1 and press enter.
@@ -31,7 +31,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the CircleCI organization name prompt, enter `valet-labs`. This is the organization we'll be using throughout these labs.
```console
$ gh valet configure
$ gh actions-importer configure
✔ Which CI providers are you configuring?: CircleCI
Enter the following values (leave empty to omit):
✔ GitHub handle used to authenticate with the GitHub Container Registry: mona
@@ -51,18 +51,18 @@ To verify our environment is configured correctly, we are going to run the `upda
1. In the codespace terminal run the following command:
```bash
gh valet update
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.
```console
$ gh valet update
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest
ghcr.io/valet-customers/valet-cli:latest
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
```
### Next lab
+1 -1
View File
@@ -25,7 +25,7 @@ You will be performing an `audit` for the __valet-labs__ CircleCI organization t
2. Run the following command from the root directory:
```bash
gh valet audit circle-ci --output-dir tmp/audit
gh actions-importer audit circle-ci --output-dir tmp/audit
```
3. The command will list all the files written to disk in green when the command succeeds.
+5 -5
View File
@@ -22,13 +22,13 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh valet forecast circle-ci --output-dir tmp/forecast_reports --start-date 2022-09-02
gh actions-importer forecast circle-ci --output-dir tmp/forecast_reports --start-date 2022-09-02
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet forecast circle-ci --output-dir tmp/forecast_reports --start-date 2022-09-02
$ 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] Output file(s):
@@ -88,10 +88,10 @@ Additionally, these metrics are defined for each queue of runners defined in Cir
## Forecasting multiple providers
You can examine the available options for the `forecast` command by running `gh valet forecast --help`. When you do this you will see the `--source-file-path` option:
You can examine the available options for the `forecast` command by running `gh actions-importer forecast --help`. When you do this you will see the `--source-file-path` option:
```console
$ gh valet forecast -h
$ gh actions-importer forecast -h
Options:
--source-file-path <source-file-path> (REQUIRED) The file path(s) to existing jobs data.
-o, --output-dir <output-dir> (REQUIRED) The location for any output files.
@@ -109,7 +109,7 @@ You can use the `--source-file-path` CLI option to combine data from multiple re
Run the following command from within the codespace terminal:
```bash
gh valet forecast --source-file-path tmp/**/jobs/*.json -o tmp/forecast-combined
gh actions-importer forecast --source-file-path tmp/**/jobs/*.json -o tmp/forecast-combined
```
You can now inspect the output of the command to see a forecast report using all of the files matching the `tmp/**/jobs/*.json` pattern.
+2 -2
View File
@@ -24,13 +24,13 @@ You will be performing a dry run migration against a CircleCI project. Answer th
2. Run the following command from the root directory:
```bash
gh valet dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-demo-ruby-rails
gh actions-importer dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-demo-ruby-rails
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-demo-ruby-rails --circle-ci-organization valet-labs
$ 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'
[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
+2 -2
View File
@@ -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 valet dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-node-example
gh actions-importer dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-node-example
```
The converted workflow that is generated by the above command can be seen below:
@@ -103,7 +103,7 @@ This method can use any valid ruby syntax and should return a `Hash` that repres
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 valet dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-node-example --custom-transformers transformers.rb
gh actions-importer dry-run circle-ci --output-dir tmp/dry-run --circle-ci-project circleci-node-example --custom-transformers transformers.rb
```
The converted workflow that is generated by the above command will now use the custom logic for the `codecov_codecov_upload` step.
+2 -2
View File
@@ -24,13 +24,13 @@ Answer the following questions before running a `migrate` command:
1. Run the following `migrate` command in the codespace terminal. Ensure the values in `--target-url` for `:owner` and `:repo` are replaced with your values:
```bash
gh valet migrate circle-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --circle-ci-project circleci-hello-world
gh actions-importer migrate circle-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --circle-ci-project circleci-hello-world
```
2. The command will write the URL to the pull request that was created when the command succeeds.
```console
$ gh valet migrate circle-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --circle-ci-project circleci-hello-world
$ 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] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
+5 -5
View File
@@ -22,19 +22,19 @@ These steps **must** be completed prior to starting other labs.
- Run the following command in the codespace's terminal:
```bash
gh valet version
gh actions-importer version
```
- Verify the output is similar to below.
```console
$ gh valet version
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh valet github/gh-valet v0.1.12
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
```
- If `gh valet 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-valet-cli).
## Labs for CircleCI
@@ -71,5 +71,5 @@ The CLI extension for Valet can be manually installed by following these steps:
- Verify Valet CLI extension is installed and working by running the following command from the codespace's terminal:
```bash
gh valet version
gh actions-importer version
```
+1 -1
View File
@@ -10,4 +10,4 @@ Here's some helpful notes on how to contribute to this project, including detail
## How to submit a bug or request a feature
If you think you've found a bug or have a great idea for new functionality please create an issue in the [repo](https://github.com/valet-customers/labs/issues/new).
If you think you've found a bug or have a great idea for new functionality please create an issue in the [repo](https://github.com/actions/importer-labs/issues/new).
+6 -6
View File
@@ -38,7 +38,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
5. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal window.
- Run the following command: `gh valet configure`.
- Run the following command: `gh actions-importer configure`.
- Use the down arrow key to highlight `GitLab CI`, press the spacebar to select, and then press enter to continue.
- At the GitHub handle prompt, enter the GitHub handle used to generate the GitHub PAT in step 2 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 4 and press enter.
@@ -48,7 +48,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the GitLab CI URL prompt, enter `http://localhost` and press enter.
```console
$ gh valet configure
$ gh actions-importer configure
✔ Which CI providers are you configuring?: GitLab CI
Enter the following values (leave empty to omit):
✔ GitHub handle used to authenticate with the GitHub Container Registry: mona
@@ -67,18 +67,18 @@ To verify your environment is configured correctly, run the `update` CLI command
1. In the codespace terminal run the following command:
```bash
gh valet update
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.
```console
$ gh valet update
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest
ghcr.io/valet-customers/valet-cli:latest
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
```
### Next lab
+1 -1
View File
@@ -28,7 +28,7 @@ You will be performing an audit against your preconfigured GitLab server. Answer
2. Run the following command from the root directory:
```bash
gh valet audit gitlab --output-dir tmp/audit --namespace valet
gh actions-importer audit gitlab --output-dir tmp/audit --namespace valet
```
3. The command will list all the files written to disk in green when the command succeeds.
+4 -4
View File
@@ -24,7 +24,7 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh valet forecast gitlab --output-dir tmp/forecast --namespace valet --start-date 2022-08-02
gh actions-importer forecast gitlab --output-dir tmp/forecast --namespace valet --start-date 2022-08-02
```
3. The command will list all the files written to disk when the command succeeds.
@@ -83,10 +83,10 @@ Additionally, these metrics are defined for each queue of runners defined in Git
## Forecasting multiple providers
You can examine the available options for the `forecast` command by running `gh valet forecast --help`. When you do this you will see the `--source-file-path` option:
You can examine the available options for the `forecast` command by running `gh actions-importer forecast --help`. When you do this you will see the `--source-file-path` option:
```console
$ gh valet forecast -h
$ gh actions-importer forecast -h
Options:
--source-file-path <source-file-path> (REQUIRED) The file path(s) to existing jobs data.
-o, --output-dir <output-dir> (REQUIRED) The location for any output files.
@@ -104,7 +104,7 @@ You can use the `--source-file-path` CLI option to combine data from multiple re
Run the following command from within the codespace terminal:
```bash
gh valet forecast --source-file-path tmp/**/jobs/*.json --output-dir tmp/forecast-combined
gh actions-importer forecast --source-file-path tmp/**/jobs/*.json --output-dir tmp/forecast-combined
```
You can now inspect the output of the command to see a forecast report using all of the files matching the `tmp/**/jobs/*.json` pattern.
+3 -3
View File
@@ -27,13 +27,13 @@ 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 valet 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 valet --project basic-pipeline-example
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet 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 valet --project basic-pipeline-example
[2022-09-28 19:59:55] Logs: 'tmp/dry-run/log/valet-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
@@ -219,7 +219,7 @@ include:
Run the following command from the root directory:
```bash
gh valet 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 valet --project included-files-example
```
The output of the command above can be seen below:
+3 -3
View File
@@ -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 valet 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 valet --project terraform-example
```
The converted workflow that is generated by the above command can be seen below:
@@ -92,7 +92,7 @@ The `transform` method can use any valid ruby syntax and should return a `Hash`
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 valet dry-run gitlab --output-dir tmp --namespace valet --project terraform-example --custom-transformers transformers.rb
$ 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'
This is the item: $PLAN_JSON
[2022-09-28 20:29:43] Output file(s):
@@ -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 valet 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 valet --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.
+1 -1
View File
@@ -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 valet 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 valet --project rails-example
```
2. The command will write the URL to the pull request that was created when the command succeeds.
+5 -5
View File
@@ -22,19 +22,19 @@ These steps **must** be completed prior to starting other labs.
- Run the following command in the codespace terminal:
```bash
gh valet version
gh actions-importer version
```
- Verify the output is similar to below.
```console
$ gh valet version
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh valet github/gh-valet v0.1.12
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
```
- If `gh valet 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-valet-cli).
## Bootstrap a GitLab server
@@ -92,5 +92,5 @@ The CLI extension for Valet can be manually installed by following these steps:
- Verify Valet CLI extension is installed and working by running the following command from the codespace terminal:
```bash
gh valet version
gh actions-importer version
```
+6 -6
View File
@@ -32,7 +32,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
4. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal window.
- Run the following command: `gh valet configure`.
- Run the following command: `gh actions-importer configure`.
- Use the down arrow key to highlight `Jenkins`, press the spacebar to select, and then press enter to continue.
- At the GitHub handle prompt, enter the GitHub username used to generate the GitHub PAT in step 3 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 3 and press enter.
@@ -43,7 +43,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the Jenkins URL prompt, enter `http://localhost:8080/` and press enter.
```console
$ gh valet configure
$ gh actions-importer configure
✔ Which CI providers are you configuring?: Jenkins
Enter the following values (leave empty to omit):
✔ GitHub handle used to authenticate with the GitHub Container Registry: mona
@@ -63,18 +63,18 @@ To verify your environment is configured correctly, run the `update` CLI command
1. In the codespace terminal run the following command:
```bash
gh valet update
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.
```console
$ gh valet update
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest
ghcr.io/valet-customers/valet-cli:latest
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
```
### Next lab
+2 -2
View File
@@ -28,13 +28,13 @@ You will be performing an audit against your preconfigured Jenkins server. Answe
2. Run the following command from the root directory:
```bash
gh valet audit jenkins --output-dir tmp/audit
gh actions-importer audit jenkins --output-dir tmp/audit
```
3. The command will list all the files written to disk in green when the command succeeds.
```console
$ gh valet audit jenkins --output-dir tmp/audit
$ 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] Auditing 'http://localhost:8080/'
[2022-08-20 22:08:20] Output file(s):==========================================|
+5 -5
View File
@@ -26,13 +26,13 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh valet forecast jenkins --output-dir tmp/forecast --start-date 2022-08-02
gh actions-importer forecast jenkins --output-dir tmp/forecast --start-date 2022-08-02
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet forecast jenkins --output-dir tmp/forecast --start-date 2022-08-02
$ 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] Forecasting 'http://localhost:8080/'
[2022-08-20 22:08:20] Output file(s):
@@ -92,10 +92,10 @@ Additionally, these metrics are defined for each queue of runners defined in Jen
## Forecasting multiple providers
You can examine the available options for the `forecast` command by running `gh valet forecast jenkins --help`. When you do this you will see the `--source-file-path` option:
You can examine the available options for the `forecast` command by running `gh actions-importer forecast jenkins --help`. When you do this you will see the `--source-file-path` option:
```console
$ gh valet forecast -h
$ gh actions-importer forecast -h
Options:
--source-file-path <source-file-path> (REQUIRED) The file path(s) to existing jobs data.
-o, --output-dir <output-dir> (REQUIRED) The location for any output files.
@@ -113,7 +113,7 @@ You can use the `--source-file-path` CLI option to combine data from multiple re
Run the following command from within the codespace terminal:
```bash
gh valet forecast --source-file-path tmp/**/jobs/*.json --output-dir tmp/forecast-combined
gh actions-importer forecast --source-file-path tmp/**/jobs/*.json --output-dir tmp/forecast-combined
```
You can now inspect the output of the command to see a forecast report using all of the files matching the `tmp/**/jobs/*.json` pattern.
+2 -2
View File
@@ -27,13 +27,13 @@ You will be performing a dry run against a pipeline in your preconfigured Jenkin
2. Run the following command from the root directory:
```bash
gh valet dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
gh actions-importer dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
$ 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] Output file(s):
[2022-09-28 20:12:00] tmp/dry-run/test_pipeline/.github/workflows/test_pipeline.yml
+3 -3
View File
@@ -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 valet dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
gh actions-importer dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run
```
The converted workflow that is generated by the above command can be seen below:
@@ -114,7 +114,7 @@ This method can use any valid ruby syntax and should return a `Hash` that repres
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 valet dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run --custom-transformers transformers.rb
gh actions-importer dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run --custom-transformers transformers.rb
```
Open the workflow that is generated and inspect the contents. Now the `sleep` step is converted and uses the customized behavior!
@@ -161,7 +161,7 @@ end
Now, we can perform another `dry-run` command with the `--custom-transformers` CLI option. The output of the `dry-run` command should look similar to this:
```console
$ gh valet dry-run jenkins --source-url http://localhost:8080/job/test_pipeline --output-dir tmp/dry-run --custom-transformers transformers.rb
$ 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'
This is the item: {"name"=>"junit", "arguments"=>[{"key"=>"testResults", "value"=>{"isLiteral"=>true, "value"=>"**/target/*.xml"}}]}
[2022-08-20 22:08:20] Output file(s):
+2 -2
View File
@@ -24,13 +24,13 @@ Answer the following questions before running a `migrate` command:
1. Run the following `migrate` command in your codespace terminal:
```bash
gh valet 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
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
```
2. The command will write the URL to the pull request that was created when the command succeeds.
```console
$ gh valet 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
$ 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] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
+5 -5
View File
@@ -22,19 +22,19 @@ These steps **must** be completed prior to starting other labs.
- Run the following command in the codespace's terminal:
```bash
gh valet version
gh actions-importer version
```
- Verify the output is similar to below.
```console
$ gh valet version
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh valet github/gh-valet v0.1.12
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
```
- If `gh valet 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-valet-cli).
## Bootstrap a Jenkins server
@@ -92,7 +92,7 @@ The CLI extension for Valet can be manually installed by following these steps:
- Verify Valet CLI extension is installed and working by running the following command from the codespace terminal:
```bash
gh valet version
gh actions-importer version
```
## Troubleshooting the Jenkins server
+5 -5
View File
@@ -1,16 +1,16 @@
# GitHub Actions migrations powered by Valet
# GitHub Actions Importer learning labs
Valet helps facilitate the migration of Azure DevOps, CircleCI, GitLab CI, Jenkins, and Travis CI pipelines to GitHub Actions. This repository contains learning paths that teach you how to use Valet and how to approach migrations to Actions.
GitHub Actions Importer helps you plan and automate the migration of Azure DevOps, CircleCI, GitLab CI, Jenkins, and Travis CI pipelines to GitHub Actions. This repository contains learning paths that teach you how to use GitHub Actions Importer and how to approach migrations to Actions.
> Valet is currently private and you must be onboarded prior to using it. Please reach out to [GitHub Sales](https://github.com/enterprise/contact) to inquire about being granted access.
> **Note**: GitHub Actions Importer is currently available as a public preview. Visit the [sign up page](https://github.com/features/actions-importer/signup) to request access to the preview.
To get started:
1. Use the `valet-customers/labs` repository as a template to [generate](https://github.com/valet-customers/labs/generate) a new GitHub repository.
1. Use the `actions/importer-labs` repository as a template to [generate](https://github.com/actions/importer-labs/generate) a new GitHub repository.
2. Select which learning path to begin with. There are currently learning paths for:
- [Migrations from Azure DevOps to GitHub Actions](/azure_devops/readme.md)
- [Migrations from CircleCI to GitHub Actions](/circle_ci/readme.md)
- [Migrations from GitLab CI to GitHub Actions](/gitlab/readme.md)
- [Migrations from Jenkins to GitHub Actions](/jenkins/readme.md)
- [Migrations from Travis CI to GitHub Actions](/travis/readme.md)
3. Each learning path describes how to configure your codespace, bootstrap a CI/CD environment, and troubleshoot the Valet CLI.
3. Each learning path describes how to configure your codespace, bootstrap a CI/CD environment, and troubleshoot GitHub Actions Importer.
+6 -6
View File
@@ -26,7 +26,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
2. Run the `configure` CLI command:
- Select the `TERMINAL` tab from within the codespace terminal.
- Run the following command: `gh valet configure`.
- Run the following command: `gh actions-importer configure`.
- Use the down arrow key to highlight `Travis CI`, press the spacebar to select, and then press enter to continue.
- At the GitHub handle prompt, enter the GitHub username used to generate the GitHub PAT in step 3 and press enter.
- At the GitHub Container Registry prompt, enter the GitHub PAT generated in step 2 and press enter.
@@ -37,7 +37,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the Travis CI organization name, enter `valet-labs`.
```console
$ gh valet configure
$ gh actions-importer configure
✔ Which CI providers are you configuring?: Travis CI
Enter the following values (leave empty to omit):
✔ GitHub handle used to authenticate with the GitHub Container Registry: mona
@@ -57,18 +57,18 @@ To verify our environment is configured correctly, we are going to run the `upda
1. In the codespace terminal run the following command:
```bash
gh valet update
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.
```console
$ gh valet update
$ gh actions-importer update
Login Succeeded
latest: Pulling from valet-customers/valet-cli
Digest: sha256:a7d00dee8a37e25da59daeed44b1543f476b00fa2c41c47f48deeaf34a215bbb
Status: Image is up to date for ghcr.io/valet-customers/valet-cli:latest
ghcr.io/valet-customers/valet-cli:latest
Status: Image is up to date for ghcr.io/actions-importer/cli:latest
ghcr.io/actions-importer/cli:latest
```
### Next lab
+1 -1
View File
@@ -26,7 +26,7 @@ You will be performing an audit against the **valet-labs** Travis CI organizatio
2. Run the following command from the root directory:
```bash
gh valet audit travis-ci --output-dir tmp/audit
gh actions-importer audit travis-ci --output-dir tmp/audit
```
3. The command will list all the files written to disk in green when the command succeeds.
+4 -4
View File
@@ -22,13 +22,13 @@ Answer the following questions before running the `forecast` command:
2. Run the following command from the root directory:
```bash
gh valet forecast travis-ci --output-dir tmp/forecast --start-date 2022-09-02
gh actions-importer forecast travis-ci --output-dir tmp/forecast --start-date 2022-09-02
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet forecast travis-ci --output-dir tmp/forecast --start-date 2022-09-02
$ 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] Output file(s):
@@ -88,7 +88,7 @@ Additionally, these metrics are defined for each queue of runners defined in Tra
## Forecasting multiple providers
You can examine the available options for the `forecast` command by running `gh valet forecast --help`. When you do this you will see the `--source-file-path` option:
You can examine the available options for the `forecast` command by running `gh actions-importer forecast --help`. When you do this you will see the `--source-file-path` option:
![img](https://user-images.githubusercontent.com/19557880/190511652-081ae8c3-c37e-4c5f-9e7f-8fcd9fe63b3a.png)
@@ -97,7 +97,7 @@ You can use the `--source-file-path` CLI option to combine data from multiple re
Run the following command from within the codespace terminal:
```bash
gh valet forecast --source-file-path tmp/**/jobs/*.json -o tmp/forecast-combined
gh actions-importer forecast --source-file-path tmp/**/jobs/*.json -o tmp/forecast-combined
```
You can now inspect the output of the command to see a forecast report using all of the files matching the `tmp/**/jobs/*.json` pattern.
+2 -2
View File
@@ -24,13 +24,13 @@ You will be performing a dry-run against a TravisCI project. Answer the followin
2. Run the following command from the root directory:
```bash
gh valet dry-run travis-ci --travis-ci-repository "travisci-ruby-example" --output-dir tmp/dry-run
gh actions-importer dry-run travis-ci --travis-ci-repository "travisci-ruby-example" --output-dir tmp/dry-run
```
3. The command will list all the files written to disk when the command succeeds.
```console
$ gh valet dry-run travis-ci --travis-ci-repository "travisci-ruby-example" --output-dir tmp/dry-run
$ 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:05] Output file(s):
[2022-09-19 19:46:05] tmp/dry-run/valet-labs/travisci-ruby-example/.github/workflows/travisci-ruby-example.yml
+2 -2
View File
@@ -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 valet dry-run travis-ci --travis-ci-repository "travisci-deploy-example" --output-dir tmp/dry-run
gh actions-importer dry-run travis-ci --travis-ci-repository "travisci-deploy-example" --output-dir tmp/dry-run
```
The converted workflow that is generated by the above command can be seen below:
@@ -126,7 +126,7 @@ This method can use any valid ruby syntax and should return a `Hash`, or an arra
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 valet dry-run travis-ci --travis-ci-repository "travisci-deploy-example" --output-dir tmp/travis/dry-run --custom-transformers transformers.rb
gh actions-importer dry-run travis-ci --travis-ci-repository "travisci-deploy-example" --output-dir tmp/travis/dry-run --custom-transformers transformers.rb
```
The converted workflow that is generated by the above command will now use the custom logic for the `codedeploy` step.
+2 -2
View File
@@ -24,13 +24,13 @@ Answer the following questions before running a `migrate` command:
1. Run the following `migrate` command in the codespace terminal. Ensure the values in `--target-url` for `:owner` and `:repo` are replaced with your values:
```bash
gh valet migrate travis-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --travis-ci-repository "travisci-deploy-example"
gh actions-importer migrate travis-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --travis-ci-repository "travisci-deploy-example"
```
2. The command will write the URL to the pull request that was created when the command succeeds.
```console
$ gh valet migrate travis-ci --target-url https://github.com/:owner/:repo --output-dir tmp/migrate --travis-ci-repository "travisci-deploy-example"
$ 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] Pull request: 'https://github.com/:owner/:repo/pull/1'
```
+5 -5
View File
@@ -22,19 +22,19 @@ These steps **must** be completed prior to starting other labs.
- Run the following command in the codespace's terminal:
```bash
gh valet version
gh actions-importer version
```
- Verify the output is similar to below.
```console
$ gh valet version
$ gh actions-importer version
gh version 2.14.3 (2022-07-26)
gh valet github/gh-valet v0.1.12
gh actions-importer github/gh-valet v0.1.12
valet-cli unknown
```
- If `gh valet 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-valet-cli).
## Labs for Travis CI
@@ -71,5 +71,5 @@ The CLI extension for Valet can be manually installed by following these steps:
- Verify Valet CLI extension is installed and working by running the following command from the codespace's terminal:
```bash
gh valet version
gh actions-importer version
```