Rebrand labs
This commit is contained in:
+18
-18
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
@@ -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
@@ -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.
|
||||

|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user