Apply suggestions from code review
This commit is contained in:
@@ -27,7 +27,14 @@ Answer the following questions before running the `forecast` command:
|
|||||||
|
|
||||||
3. The command will list all the files written to disk when the command succeeds.
|
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
|
||||||
|
[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):
|
||||||
|
[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
|
||||||
|
```
|
||||||
|
|
||||||
## Review the forecast report
|
## Review the forecast report
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -29,7 +29,12 @@ You will be performing a dry-run against a TravisCI project. Answer the followin
|
|||||||
|
|
||||||
3. The command will list all the files written to disk when the command succeeds.
|
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
|
||||||
|
[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.yml
|
||||||
|
```
|
||||||
|
|
||||||
4. View the converted workflow:
|
4. View the converted workflow:
|
||||||
- Find `tmp/dry-run` in the file explorer pane in your codespace.
|
- Find `tmp/dry-run` in the file explorer pane in your codespace.
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ The converted workflow above contains an `codedeploy` step that was not automati
|
|||||||
Now you can begin to write the custom transformer. Custom transformers use a DSL built on top of Ruby and should be defined in a file with the `.rb` file extension. You can create this file by running the following command in your codespace terminal:
|
Now you can begin to write the custom transformer. Custom transformers use a DSL built on top of Ruby and should be defined in a file with the `.rb` file extension. You can create this file by running the following command in your codespace terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
code transformers.rb
|
touch transformers.rb && code transformers.rb
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, you will define a `transform` method for the `codedeploy` identifier by adding the following code to `transformers.rb`:
|
Next, you will define a `transform` method for the `codedeploy` identifier by adding the following code to `transformers.rb`:
|
||||||
@@ -107,15 +107,15 @@ Next, you will define a `transform` method for the `codedeploy` identifier by ad
|
|||||||
transform "codedeploy" do |_item|
|
transform "codedeploy" do |_item|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"uses": "aws-actions/configure-aws-credentials@v1",
|
"uses" => "aws-actions/configure-aws-credentials@v1",
|
||||||
"with": {
|
"with" => {
|
||||||
"role-to-assume": "owner",
|
"role-to-assume" => "owner",
|
||||||
"role-session-name": "GitHub-Action-Role",
|
"role-session-name" => "GitHub-Action-Role",
|
||||||
"aws-region": "east-2"
|
"aws-region" => "east-2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"run": "echo \"Deploying branch ${{ env.GITHUB_REF }} to ${{ github.event.inputs.environment }}\"\ncommit_hash=`git rev-parse HEAD`\naws deploy create-deployment --application-name MyApp --deployment-group-name MyDeploymentGroup --github-location repository=$GITHUB_REPOSITORY,commitId=$commit_hash --ignore-application-stop-failures\n"
|
"run" => "echo \"Deploying branch ${{ env.GITHUB_REF }} to ${{ github.event.inputs.environment }}\"\ncommit_hash=`git rev-parse HEAD`\naws deploy create-deployment --application-name MyApp --deployment-group-name MyDeploymentGroup --github-location repository=$GITHUB_REPOSITORY,commitId=$commit_hash --ignore-application-stop-failures\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
@@ -241,7 +241,7 @@ That's it! Congratulations, you have overridden Valet's default behavior by cust
|
|||||||
|
|
||||||
- Unknown steps
|
- Unknown steps
|
||||||
- Environment variables
|
- Environment variables
|
||||||
- Runner
|
- Runners
|
||||||
|
|
||||||
## Next lab
|
## Next lab
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -30,7 +30,11 @@ Answer the following questions before running a `migrate` command:
|
|||||||
|
|
||||||
2. The command will write the URL to the pull request that was created when the command succeeds.
|
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"
|
||||||
|
[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.
|
3. Open the generated pull request in a new browser tab.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user