Update labs to use text instead of images

This commit is contained in:
Ethan Dennis
2022-09-19 12:49:08 -07:00
parent b25b372923
commit fc0f71f88d
6 changed files with 57 additions and 28 deletions
+16 -4
View File
@@ -14,7 +14,7 @@ Answer the following questions before running the `forecast` command:
1. What is the date you want to start forecasting from?
- **2022-09-02**. This date is needed as it is prior to when the bulk of builds were trigger in the demo CircleCI organization 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.
2. Where do you want to store the results?
- **./tmp/forecast_reports**
- **tmp/forecast_reports**
### Steps
@@ -22,7 +22,7 @@ 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 valet 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.
@@ -83,14 +83,26 @@ Additionally, these metrics are defined for each queue of runners defined in Cir
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:
![img](https://user-images.githubusercontent.com/19557880/186263140-f02c6cab-7979-417c-bdfe-b9590e9c5597.png)
```console
$ gh valet 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.
--start-date <start-date> The start date of the forecast analysis in YYYY-MM-DD format. [default: 9/12/2022 12:42:39 PM]
--time-slice <time-slice> The time slice in seconds to use for computing concurrency metrics. [default: 60]
--credentials-file <credentials-file> The file containing the credentials to use.
--no-telemetry Boolean value to disallow telemetry.
--no-ssl-verify Disable ssl certificate verification.
--no-http-cache Disable caching of http responses.
-?, -h, --help Show help and usage information
```
You can use the `--source-file-path` CLI option to combine data from multiple reports into a single report. This becomes useful if you use multiple CI/CD providers and want to get a holistic view of the runner usage. This works by using the `.json` files generated by `forecast` commands as space-delimited values for the `--source-file-path` CLI option. Optionally, this value could be a glob pattern to dynamically specify the list of files (e.g. `**/*.json`).
Run the following command from within the codespace terminal:
```bash
gh valet forecast --source-file-path tmp/**/jobs/*.json -o tmp/combined-forecast
gh valet 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.
+9 -4
View File
@@ -16,7 +16,7 @@ You will be performing a dry run migration against a CircleCI project. Answer th
- __circleci-demo-ruby-rails__. This is one of the sample projects avaiable in the CircleCI valet-labs organization.
2. Where do you want to store the result?
- __./tmp/dry-run-lab__. This can be any path within the working directory that Valet commands are executed from.
- __tmp/dry-run-lab__. This can be any path within the working directory that Valet commands are executed from.
### Steps
@@ -24,15 +24,20 @@ 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-lab --circle-ci-project circleci-demo-ruby-rails
gh valet dry-run circle-ci --output-dir tmp/dry-run-lab --circle-ci-project circleci-demo-ruby-rails
```
3. The command will list all the files written to disk when the command succeeds.
![command-result](https://user-images.githubusercontent.com/18723510/189911131-bf6bfd6f-2b5e-4e49-8d14-95ef9c312117.png)
```console
$ gh valet dry-run circle-ci --output-dir tmp/dry-run-lab --circle-ci-project circleci-demo-ruby-rails --circle-ci-organization valet-labs
[2022-09-19 19:46:03] Logs: 'tmp/dry-run-lab/log/valet-20220919-194603.log'
[2022-09-19 19:46:05] Output file(s):
[2022-09-19 19:46:05] tmp/dry-run-lab/valet-labs/circleci-demo-ruby-rails/build_and_test.yml
```
4. View the converted workflow:
- Find `./tmp/dry-run-lab/valet-labs/circleci-demo-ruby-rails` in the file explorer pane in your codespace.
- Find `tmp/dry-run-lab/valet-labs/circleci-demo-ruby-rails` in the file explorer pane in your codespace.
- Click `build_and_test.yml` to open.
## Inspect the output files
+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 -o tmp/custom_transformers --circle-ci-project circleci-node-example
gh valet 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 -o tmp/custom_transformers --circle-ci-project circleci-node-example --custom-transformers transformers.rb
gh valet 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.
+7 -3
View File
@@ -16,7 +16,7 @@ Answer the following questions before running a `migrate` command:
1. What project do you want to migrate?
- __circleci-hello-world__
2. Where do you want to store the logs?
- __./tmp/migrate__
- __tmp/migrate__
3. What is the URL for the GitHub repository to add the workflow to?
- __this repository__. The URL should follow the pattern <https://github.com/:owner/:repo> with `:owner` and `:repo` replaced with your values.
@@ -25,12 +25,16 @@ 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 valet 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.
![pr](https://user-images.githubusercontent.com/18723510/189923353-1166bd94-8d64-4924-ac55-3e06fa5d1734.png)
```console
$ gh valet 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'
```
3. Open the generated pull request in a new browser tab.
+13 -1
View File
@@ -85,7 +85,19 @@ Additionally, these metrics are defined for each queue of runners defined in Git
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:
![img](https://user-images.githubusercontent.com/19557880/186263140-f02c6cab-7979-417c-bdfe-b9590e9c5597.png)
```console
$ gh valet 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.
--start-date <start-date> The start date of the forecast analysis in YYYY-MM-DD format. [default: 9/12/2022 12:42:39 PM]
--time-slice <time-slice> The time slice in seconds to use for computing concurrency metrics. [default: 60]
--credentials-file <credentials-file> The file containing the credentials to use.
--no-telemetry Boolean value to disallow telemetry.
--no-ssl-verify Disable ssl certificate verification.
--no-http-cache Disable caching of http responses.
-?, -h, --help Show help and usage information
```
You can use the `--source-file-path` CLI option to combine data from multiple reports into a single report. This becomes useful if you use multiple CI/CD providers and want to get a holistic view of the runner usage. This works by using the `.json` files generated by `forecast` commands as space-delimited values for the `--source-file-path` CLI option. Optionally, this value could be a glob pattern to dynamically specify the list of files (e.g. `**/*.json`).
+10 -14
View File
@@ -95,21 +95,17 @@ Additionally, these metrics are defined for each queue of runners defined in Jen
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:
```console
$ gh valet forecast jenkins --help
$ gh valet forecast -h
Options:
-u, --jenkins-instance-url <jenkins-instance-url> The URL of the Jenkins CI instance.
-n, --jenkins-username <jenkins-username> Username for the Jenkins instance.
-t, --jenkins-access-token <jenkins-access-token> Access token for the Jenkins instance.
-f, --folders <folders> Folders to forecast in the instance
--source-file-path <source-file-path> The file path(s) to existing jobs data.
-o, --output-dir <output-dir> (REQUIRED) The location for any output files.
--start-date <start-date> The start date of the forecast analysis in YYYY-MM-DD format. [default: 9/9/2022 2:14:15 AM]
--time-slice <time-slice> The time slice in seconds to use for computing concurrency metrics. [default: 60]
--credentials-file <credentials-file> The file containing the credentials to use.
--no-telemetry Boolean value to disallow telemetry.
--no-ssl-verify Disable ssl certificate verification.
--no-http-cache Disable caching of http responses.
-?, -h, --help Show help and usage information
--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.
--start-date <start-date> The start date of the forecast analysis in YYYY-MM-DD format. [default: 9/12/2022 12:42:39 PM]
--time-slice <time-slice> The time slice in seconds to use for computing concurrency metrics. [default: 60]
--credentials-file <credentials-file> The file containing the credentials to use.
--no-telemetry Boolean value to disallow telemetry.
--no-ssl-verify Disable ssl certificate verification.
--no-http-cache Disable caching of http responses.
-?, -h, --help Show help and usage information
```
You can use the `--source-file-path` CLI option to combine data from multiple reports into a single report. This becomes useful if you use multiple CI/CD providers and wanted to get a holistic view of the runner usage. This works by using the `.json` files generated by `forecast` commands as space-delimited values for the `--source-file-path` CLI option. Optionally, this value could be a glob pattern to dynamically specify the list of files (e.g. `**/*.json`).