Merge pull request #70 from valet-customers/audit-workflows-csv
Audit workflow usage csv overview
This commit is contained in:
@@ -173,6 +173,32 @@ Each pipeline will have a variety of files written that include:
|
||||
- The converted workflow.
|
||||
- Stack traces that can used to troubleshoot a failed pipeline conversion
|
||||
|
||||
## Inspect the workflow usage csv file
|
||||
|
||||
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
|
||||
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
|
||||
|
||||
```csv
|
||||
Pipeline,Action,File path
|
||||
lab-test/pipelines/valet-pipeline2,actions/checkout@v2,/data/tmp/adoa/lab-test/pipelines/valet-pipeline2.yml
|
||||
lab-test/pipelines/valet-pipeline1,actions/checkout@v2,/data/tmp/adoa/lab-test/pipelines/valet-pipeline1.yml
|
||||
lab-test/pipelines/valet-custom-transformer-example,actions/checkout@v2,/data/tmp/adoa/lab-test/pipelines/valet-custom-transformer-example.yml
|
||||
lab-test/pipelines/valet-custom-transformer-example,actions/setup-node@v2,/data/tmp/adoa/lab-test/pipelines/valet-custom-transformer-example.yml
|
||||
|
||||
Pipeline,Secret,File path
|
||||
|
||||
|
||||
Pipeline,Runner,File path
|
||||
lab-test/pipelines/valet-pipeline2,mechamachine,/data/tmp/adoa/lab-test/pipelines/valet-pipeline2.yml
|
||||
lab-test/pipelines/valet-custom-transformer-example,mechamachine,/data/tmp/adoa/lab-test/pipelines/valet-custom-transformer-example.yml
|
||||
```
|
||||
|
||||
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?
|
||||
- What workflows use specific runners?
|
||||
|
||||
### Next lab
|
||||
|
||||
[Forecast potential build runner usage](3-forecast.md)
|
||||
|
||||
@@ -191,6 +191,40 @@ Each pipeline will have a variety of files written that include:
|
||||
- The converted workflow.
|
||||
- Stack traces that can used to troubleshoot a failed pipeline conversion
|
||||
|
||||
## Inspect the workflow usage csv file
|
||||
|
||||
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
|
||||
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
|
||||
|
||||
```csv
|
||||
Pipeline,Action,File path
|
||||
valet-labs/circleci-hello-world,actions/checkout@v2,/data/tmp/audit/valet-labs/circleci-hello-world/say-hello-workflow.yml
|
||||
valet-labs/circleci-command-example,./.github/actions/greeting,/data/tmp/audit/valet-labs/circleci-command-example/my-workflow.yml
|
||||
valet-labs/circleci-node-example,actions/checkout@v2,/data/tmp/audit/valet-labs/circleci-node-example/sample.yml
|
||||
valet-labs/circleci-node-example,actions/cache@v2,/data/tmp/audit/valet-labs/circleci-node-example/sample.yml
|
||||
valet-labs/circleci-python-example,actions/checkout@v2,/data/tmp/audit/valet-labs/circleci-python-example/sample.yml
|
||||
valet-labs/circleci-python-example,actions/cache@v2,/data/tmp/audit/valet-labs/circleci-python-example/sample.yml
|
||||
valet-labs/circleci-demo-java-spring,actions/checkout@v2,/data/tmp/audit/valet-labs/circleci-demo-java-spring/workflow.yml
|
||||
valet-labs/circleci-demo-java-spring,actions/cache@v2,/data/tmp/audit/valet-labs/circleci-demo-java-spring/workflow.yml
|
||||
valet-labs/circleci-demo-java-spring,actions/upload-artifact@v2,/data/tmp/audit/valet-labs/circleci-demo-java-spring/workflow.yml
|
||||
valet-labs/circleci-demo-java-spring,actions/download-artifact@v2,/data/tmp/audit/valet-labs/circleci-demo-java-spring/workflow.yml
|
||||
valet-labs/circleci-demo-ruby-rails,ruby/setup-ruby@v1,/data/tmp/audit/valet-labs/circleci-demo-ruby-rails/build_and_test.yml
|
||||
valet-labs/circleci-demo-ruby-rails,actions/checkout@v2,/data/tmp/audit/valet-labs/circleci-demo-ruby-rails/build_and_test.yml
|
||||
valet-labs/circleci-demo-ruby-rails,actions/cache@v2,/data/tmp/audit/valet-labs/circleci-demo-ruby-rails/build_and_test.yml
|
||||
|
||||
Pipeline,Secret,File path
|
||||
|
||||
|
||||
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?
|
||||
- What workflows use specific runners?
|
||||
|
||||
### Next lab
|
||||
|
||||
[Forecast potential build runner usage](3-forecast.md)
|
||||
|
||||
@@ -56,7 +56,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
|
||||
✔ Personal access token for GitHub: ***************
|
||||
✔ Base url of the GitHub instance: https://github.com
|
||||
✔ Private token for GitLab: ***************
|
||||
✔ Base url of the GitLab instance: https://gitlab.com
|
||||
✔ Base url of the GitLab instance: http://localhost
|
||||
Environment variables successfully updated.
|
||||
```
|
||||
|
||||
|
||||
@@ -181,6 +181,47 @@ Each pipeline will have a variety of files written that include:
|
||||
- The converted workflow.
|
||||
- Stack traces that can be used to troubleshoot a failed pipeline conversion
|
||||
|
||||
## Inspect the workflow usage csv file
|
||||
|
||||
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
|
||||
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
|
||||
|
||||
```csv
|
||||
Pipeline,Action,File path
|
||||
valet/included-files-example,actions/checkout@v2,/data/tmp/audit/valet/included-files-example.yml
|
||||
valet/terraform-example,actions/checkout@v2,/data/tmp/audit/valet/terraform-example.yml
|
||||
valet/child-parent-example,actions/checkout@v2,/data/tmp/audit/valet/child-parent-example.yml
|
||||
valet/child-parent-example,./.github/workflows/a-.gitlab-ci.yml,/data/tmp/audit/valet/child-parent-example.yml
|
||||
valet/child-parent-example,./.github/workflows/b-.gitlab-ci.yml,/data/tmp/audit/valet/child-parent-example.yml
|
||||
valet/include-file-example,actions/checkout@v2,/data/tmp/audit/valet/include-file-example.yml
|
||||
valet/basic-pipeline-example,actions/checkout@v2,/data/tmp/audit/valet/basic-pipeline-example.yml
|
||||
valet/gatsby-example,actions/checkout@v2,/data/tmp/audit/valet/gatsby-example.yml
|
||||
valet/gatsby-example,actions/cache@v2,/data/tmp/audit/valet/gatsby-example.yml
|
||||
valet/gatsby-example,actions/upload-artifact@v2,/data/tmp/audit/valet/gatsby-example.yml
|
||||
valet/gatsby-example,actions/download-artifact@v2,/data/tmp/audit/valet/gatsby-example.yml
|
||||
valet/gatsby-example,JamesIves/[email protected],/data/tmp/audit/valet/gatsby-example.yml
|
||||
valet/android-example,actions/checkout@v2,/data/tmp/audit/valet/android-example.yml
|
||||
valet/android-example,actions/upload-artifact@v2,/data/tmp/audit/valet/android-example.yml
|
||||
valet/android-example,actions/download-artifact@v2,/data/tmp/audit/valet/android-example.yml
|
||||
valet/dotnet-example,actions/checkout@v2,/data/tmp/audit/valet/dotnet-example.yml
|
||||
valet/dotnet-example,actions/upload-artifact@v2,/data/tmp/audit/valet/dotnet-example.yml
|
||||
valet/dotnet-example,actions/download-artifact@v2,/data/tmp/audit/valet/dotnet-example.yml
|
||||
valet/node-example,actions/checkout@v2,/data/tmp/audit/valet/node-example.yml
|
||||
valet/node-example,actions/cache@v2,/data/tmp/audit/valet/node-example.yml
|
||||
valet/rails-example,actions/checkout@v2,/data/tmp/audit/valet/rails-example.yml
|
||||
|
||||
Pipeline,Secret,File path
|
||||
valet/rails-example,${{ secrets.PASSWORD }},/data/tmp/audit/valet/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?
|
||||
- What workflows use specific runners?
|
||||
|
||||
### Next lab
|
||||
|
||||
[Forecast potential build runner usage](3-forecast.md)
|
||||
|
||||
@@ -122,7 +122,7 @@ The converted workflow that is generated by the above command will now use the c
|
||||
|
||||
```diff
|
||||
- # # 'artifacts.terraform' was not transformed because there is no suitable equivalent in GitHub Actions
|
||||
+ uses: actions/upload-artifact@v2
|
||||
+ uses: actions/upload-artifact@v3
|
||||
+ with:
|
||||
+ path: "$PLAN_JSON"
|
||||
```
|
||||
|
||||
@@ -25,6 +25,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
|
||||
- In the left panel, click `Developer Settings`.
|
||||
- Click `Personal access tokens` and then `Legacy tokens` (if present).
|
||||
- Click `Generate new token` and then `Generate new legacy token`. You may be required to authenticate with GitHub during this step.
|
||||
- Name your token in the `Note` field.
|
||||
- Select the following scopes: `workflow` and `read:packages`.
|
||||
- Click `Generate token`.
|
||||
- Copy the generated PAT and save it in a safe location.
|
||||
|
||||
@@ -238,6 +238,38 @@ Each pipeline will have a variety of files written that include:
|
||||
- The converted workflow.
|
||||
- Stack traces that can used to troubleshoot a failed pipeline conversion
|
||||
|
||||
## Inspect the workflow usage csv file
|
||||
|
||||
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
|
||||
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
|
||||
|
||||
```csv
|
||||
Pipeline,Action,File path
|
||||
demo_pipeline,actions/checkout@v2,/data/tmp/audit/demo_pipeline.yml
|
||||
demo_pipeline,actions/upload-artifact@v2,/data/tmp/audit/demo_pipeline.yml
|
||||
demo_pipeline,EnricoMi/[email protected],/data/tmp/audit/demo_pipeline.yml
|
||||
monas_dev_work/monas_freestyle,actions/checkout@v2,/data/tmp/audit/monas_dev_work/monas_freestyle.yml
|
||||
monas_dev_work/monas_pipeline,actions/checkout@v2,/data/tmp/audit/monas_dev_work/monas_pipeline.yml
|
||||
test_freestyle_project,actions/checkout@v2,/data/tmp/audit/test_freestyle_project.yml
|
||||
test_pipeline,actions/checkout@v2,/data/tmp/audit/test_pipeline.yml
|
||||
test_pipeline,EnricoMi/[email protected],/data/tmp/audit/test_pipeline.yml
|
||||
|
||||
Pipeline,Secret,File path
|
||||
monas_dev_work/monas_freestyle,${{ secrets.SECRET_TEST_EXPRESSION_VAR }},/data/tmp/audit/monas_dev_work/monas_freestyle.yml
|
||||
test_freestyle_project,${{ secrets.EXPRESSION_FIRST_VAR }},/data/tmp/audit/test_freestyle_project.yml
|
||||
|
||||
Pipeline,Runner,File path
|
||||
demo_pipeline,TeamARunner,/data/tmp/audit/demo_pipeline.yml
|
||||
test_freestyle_project,DemoRunner,/data/tmp/audit/test_freestyle_project.yml
|
||||
test_pipeline,TeamARunner,/data/tmp/audit/test_pipeline.yml
|
||||
```
|
||||
|
||||
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?
|
||||
- What workflows use specific runners?
|
||||
|
||||
## Next lab
|
||||
|
||||
[Forecast potential build runner usage](3-forecast.md)
|
||||
|
||||
@@ -12,6 +12,7 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
|
||||
- In the left panel, click `Developer Settings`.
|
||||
- Click `Personal access tokens` and then `Legacy tokens` (if present).
|
||||
- Click `Generate new token` and then `Generate new legacy token`. You may be required to authenticate with GitHub during this step.
|
||||
- Name your token in the `Note` field.
|
||||
- Select the following scopes: `workflow` and `read:packages`.
|
||||
- Click `Generate token`.
|
||||
- Copy the generated PAT and save it in a safe location.
|
||||
@@ -19,13 +20,15 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
|
||||
3. Create a Travis CI personal access token (PAT):
|
||||
- Open app.travis-ci.com in a new browser tab.
|
||||
- Click on your profile icon in the top right hand corner to reveal a dropdown menu.
|
||||
- Click `Settings`.
|
||||
- Click on the `Settings` tab.
|
||||
- Click on the `COPY TOKEN` button under "API authentication header" and save it in a safe location.
|
||||
- Click on the `COPY TOKEN` button under the "API authentication" header and save it in a safe location.
|
||||
|
||||
2. Run the `configure` CLI command:
|
||||
- Select the `TERMINAL` tab from within the codespace terminal.
|
||||
- Run the following command: `gh valet 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.
|
||||
- At the GitHub PAT prompt, enter the GitHub PAT generated in step 2 and press enter.
|
||||
- At the GitHub URL prompt, enter the GitHub instance URL or press enter to accept the default value (`https://github.com`).
|
||||
|
||||
+30
-1
@@ -15,7 +15,7 @@ The `audit` command operates by performing the following:
|
||||
|
||||
## Perform an audit
|
||||
|
||||
You will be performing an audit against the **labs-data** 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 **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:
|
||||
|
||||
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.
|
||||
@@ -316,6 +316,35 @@ Each pipeline will have a variety of files written that include:
|
||||
- The converted workflow.
|
||||
- Stack traces that can used to troubleshoot a failed pipeline conversion
|
||||
|
||||
## Inspect the workflow usage csv file
|
||||
|
||||
1. Open the `tmp/audit/workflow_usage.csv` file in the file explorer.
|
||||
2. This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
|
||||
|
||||
```csv
|
||||
Pipeline,Action,File path
|
||||
valet-labs/travisci-php-example,actions/checkout@v2,/data/tmp/audit/valet-labs/travisci-php-example.yml
|
||||
valet-labs/travisci-php-example,shivammathur/setup-php@v2,/data/tmp/audit/valet-labs/travisci-php-example.yml
|
||||
valet-labs/travisci-php-example,rectalogic/notify-irc@v1,/data/tmp/audit/valet-labs/travisci-php-example.yml
|
||||
valet-labs/travisci-nodejs-example,actions/checkout@v2,/data/tmp/audit/valet-labs/travisci-nodejs-example.yml
|
||||
valet-labs/travisci-ruby-example,actions/checkout@v2,/data/tmp/audit/valet-labs/travisci-ruby-example.yml
|
||||
valet-labs/travisci-ruby-example,ruby/setup-ruby@v1,/data/tmp/audit/valet-labs/travisci-ruby-example.yml
|
||||
valet-labs/travisci-python-example,actions/checkout@v2,/data/tmp/audit/valet-labs/travisci-python-example.yml
|
||||
valet-labs/travisci-deploy-example,actions/checkout@v2,/data/tmp/audit/valet-labs/travisci-deploy-example.yml
|
||||
valet-labs/travisci-deploy-example,desiderati/github-action-pushover@v1,/data/tmp/audit/valet-labs/travisci-deploy-example.yml
|
||||
|
||||
Pipeline,Secret,File path
|
||||
valet-labs/travisci-deploy-example,${{ secrets.PUSHOVER_USER_KEY }},/data/tmp/audit/valet-labs/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?
|
||||
- What workflows use specific runners?
|
||||
|
||||
### Next lab
|
||||
|
||||
[Forecast potential build runner usage](3-forecast.md)
|
||||
|
||||
@@ -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 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 Travis CI 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.
|
||||
- **2022-09-02**. This date is needed as it is prior to when the bulk of builds were triggered in the demo Travis CI 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**
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ You will be performing a dry-run against a TravisCI project. Answer the followin
|
||||
```
|
||||
|
||||
4. View the converted workflow:
|
||||
- Find `tmp/dry-run` in the file explorer pane in your codespace.
|
||||
- Find `tmp/dry-run/valet-labs` in the file explorer pane in your codespace.
|
||||
- Click `travisci-ruby-example.yml` to open.
|
||||
|
||||
## Inspect the output files
|
||||
|
||||
@@ -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 "deploy-example" --output-dir tmp/travis/dry-run --custom-transformers transformers.rb
|
||||
gh valet 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.
|
||||
@@ -188,8 +188,8 @@ Finally, you can use custom transformers to dictate which runners converted work
|
||||
1. What is the label of the runner in Travis to update?
|
||||
- __linux__
|
||||
|
||||
2. What is the label of the runner in Actions to use instead?
|
||||
- __new-runner__
|
||||
2. What is/are the label(s) of the runner(s) in Actions to use instead?
|
||||
- __new-runner__, __self-hosted__
|
||||
|
||||
With these questions answered, you can add the following code to the `transformers.rb` file:
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ In this lab, you will use the `migrate` command to convert a Travis CI pipeline
|
||||
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#configuring-credentials).
|
||||
3. Completed the [dry-run lab](./3-dry-run.md).
|
||||
4. Completed the [custom transformers lab](./4-custom-transformers.md).
|
||||
|
||||
## Performing a migration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user