Merge pull request #65 from valet-customers/travis-pipeline-updates

Update travis pipeline location to Valet-labs
This commit is contained in:
Begona Guereca
2022-09-16 14:32:38 -07:00
committed by GitHub
7 changed files with 189 additions and 210 deletions
+4 -4
View File
@@ -32,12 +32,12 @@ You will need to complete all of the setup instructions [here](./readme.md#confi
- At the GitHub url prompt enter the GitHub instance url or hit enter to accept the default value (`https://github.com`).
- At the Travis CI token prompt enter the Travis CI access token from step 2 and press enter.
- At the Travis CI base url prompt hit enter to accept the default value (`https://travis-ci.com`).
- At the Travis CI organization name enter `valet-travis-labs`.
- At the Travis CI organization name enter `valet-labs`.
- At the access token to fetch source code in GitHub prompt enter the GitHub PAT generated in step 1 and press enter.
- At the GitHub instance url containing source code prompt press enter to accept the default value (`https://github.com`).
![configure-cli-terminal](https://user-images.githubusercontent.com/19557880/189158118-833e46c3-b3f5-49e8-8f20-63d1607b0d8c.png)
![configure-cli-terminal](https://user-images.githubusercontent.com/19557880/190726544-b07dbc5f-6756-44f2-a24c-54bb3f4d0414.png)
## Verify your environment
To verify our environment is configured correctly, we are going to run the `update` CLI command. The `update` CLI command will download the latest version of Valet to your codespace.
+88 -108
View File
@@ -3,6 +3,7 @@
In this lab, you will use the `audit` command to get a high-level view of all projects in a Travis CI organization.
The `audit` command operates by performing the following:
- Fetching all of the projects defined in a Travis CI organization.
- Converting each to their equivalent GitHub Actions workflow.
- Generating a report that summarizes how complete and complex of a migration is possible with Valet.
@@ -45,83 +46,79 @@ The pipeline summary section contains high level statistics regarding the conver
```md
# Audit summary
Summary for [Travis CI instance](https://travis-ci.com/valet-travis-labs)
Summary for [Travis CI instance](https://travis-ci.com/valet-labs)
- Valet version: **0.1.0.13539 (5bb6c723d6db3688ea0653e14bbf3c63df445bfc)**
- Performed at: **9/15/22 at 22:24**
- Performed at: **9/16/22 at 20:01**
## Pipelines
Total: **6**
Total: **5**
- Successful: **0 (0%)**
- Partially successful: **6 (100%)**
- Partially successful: **5 (100%)**
- Unsupported: **0 (0%)**
- Failed: **0 (0%)**
### Job types
Supported: **6 (100%)**
Supported: **5 (100%)**
- ruby: **2**
- c: **1**
- nodejs: **1**
- php: **1**
- nodejs: **1**
- ruby: **2**
- python: **1**
### Build steps
Total: **29**
Total: **25**
Known: **26 (89%)**
Known: **22 (88%)**
- script: **7**
- install: **6**
- script: **5**
- before_script: **3**
- rvm: **2**
- after_deploy: **2**
- ccache: **1**
- pushover: **1**
- dependencies: **1**
- irc: **1**
- before_deploy: **1**
- php: **1**
- irc: **1**
Unknown: **1 (3%)**
Unknown: **1 (4%)**
- codedeploy: **1**
Unsupported: **2 (6%)**
Unsupported: **2 (8%)**
- sudo: **2**
Actions: **32**
Actions: **28**
- run: **19**
- actions/checkout@v2: **7**
- run: **17**
- actions/checkout@v2: **6**
- ruby/setup-ruby@v1: **2**
- actions/cache@v2: **1**
- desiderati/github-action-pushover@v1: **1**
- shivammathur/setup-php@v2: **1**
- rectalogic/notify-irc@v1: **1**
- shivammathur/setup-php@v2: **1**
- desiderati/github-action-pushover@v1: **1**
### Triggers
Total: **36**
Total: **30**
Known: **36 (100%)**
Known: **30 (100%)**
- crons: **6**
- branches: **6**
- config_validation: **6**
- build_pull_requests: **6**
- build_pushes: **6**
- builds_only_with_travis_yml: **6**
- crons: **5**
- branches: **5**
- config_validation: **5**
- build_pull_requests: **5**
- build_pushes: **5**
- builds_only_with_travis_yml: **5**
Actions: **12**
Actions: **10**
- pull_request: **6**
- push: **6**
- pull_request: **5**
- push: **5**
### Environment
@@ -137,16 +134,16 @@ Actions: **1**
### Other
Total: **18**
Total: **15**
Known: **12 (66%)**
Known: **10 (66%)**
- auto_cancel_pull_requests: **6**
- auto_cancel_pushes: **6**
- auto_cancel_pull_requests: **5**
- auto_cancel_pushes: **5**
Unknown: **6 (33%)**
Unknown: **5 (33%)**
- maximum_number_of_builds: **6**
- maximum_number_of_builds: **5**
Actions: **3**
@@ -163,42 +160,35 @@ Secrets: **1**
### Partially successful
#### valet-travis-labs/deploy-example
#### valet-labs/travisci-php-example
- [valet-travis-labs/deploy-example.yml](valet-travis-labs/deploy-example.yml)
- [valet-travis-labs/deploy-example.config.json](valet-travis-labs/deploy-example.config.json)
- [valet-travis-labs/deploy-example.source.yml](valet-travis-labs/deploy-example.source.yml)
- [valet-labs/travisci-php-example.yml](valet-labs/travisci-php-example.yml)
- [valet-labs/travisci-php-example.config.json](valet-labs/travisci-php-example.config.json)
- [valet-labs/travisci-php-example.source.yml](valet-labs/travisci-php-example.source.yml)
#### valet-travis-labs/c-sharp-example
#### valet-labs/travisci-nodejs-example
- [valet-travis-labs/c-sharp-example.yml](valet-travis-labs/c-sharp-example.yml)
- [valet-travis-labs/c-sharp-example.config.json](valet-travis-labs/c-sharp-example.config.json)
- [valet-travis-labs/c-sharp-example.source.yml](valet-travis-labs/c-sharp-example.source.yml)
- [valet-labs/travisci-nodejs-example.yml](valet-labs/travisci-nodejs-example.yml)
- [valet-labs/travisci-nodejs-example.config.json](valet-labs/travisci-nodejs-example.config.json)
- [valet-labs/travisci-nodejs-example.source.yml](valet-labs/travisci-nodejs-example.source.yml)
#### valet-travis-labs/ruby-example
#### valet-labs/travisci-ruby-example
- [valet-travis-labs/ruby-example.yml](valet-travis-labs/ruby-example.yml)
- [valet-travis-labs/ruby-example.config.json](valet-travis-labs/ruby-example.config.json)
- [valet-travis-labs/ruby-example.source.yml](valet-travis-labs/ruby-example.source.yml)
- [valet-labs/travisci-ruby-example.yml](valet-labs/travisci-ruby-example.yml)
- [valet-labs/travisci-ruby-example.config.json](valet-labs/travisci-ruby-example.config.json)
- [valet-labs/travisci-ruby-example.source.yml](valet-labs/travisci-ruby-example.source.yml)
#### valet-travis-labs/nodejs-example
#### valet-labs/travisci-python-example
- [valet-travis-labs/nodejs-example.yml](valet-travis-labs/nodejs-example.yml)
- [valet-travis-labs/nodejs-example.config.json](valet-travis-labs/nodejs-example.config.json)
- [valet-travis-labs/nodejs-example.source.yml](valet-travis-labs/nodejs-example.source.yml)
- [valet-labs/travisci-python-example.yml](valet-labs/travisci-python-example.yml)
- [valet-labs/travisci-python-example.config.json](valet-labs/travisci-python-example.config.json)
- [valet-labs/travisci-python-example.source.yml](valet-labs/travisci-python-example.source.yml)
#### valet-travis-labs/php-example
- [valet-travis-labs/php-example.yml](valet-travis-labs/php-example.yml)
- [valet-travis-labs/php-example.config.json](valet-travis-labs/php-example.config.json)
- [valet-travis-labs/php-example.source.yml](valet-travis-labs/php-example.source.yml)
#### valet-travis-labs/python
- [valet-travis-labs/python.yml](valet-travis-labs/python.yml)
- [valet-travis-labs/python.config.json](valet-travis-labs/python.config.json)
- [valet-travis-labs/python.source.yml](valet-travis-labs/python.source.yml)
#### valet-labs/travisci-deploy-example
- [valet-labs/travisci-deploy-example.yml](valet-labs/travisci-deploy-example.yml)
- [valet-labs/travisci-deploy-example.config.json](valet-labs/travisci-deploy-example.config.json)
- [valet-labs/travisci-deploy-example.source.yml](valet-labs/travisci-deploy-example.source.yml)
```
Here are some key terms that can appear in the “Pipelines” section:
@@ -217,39 +207,36 @@ The "Job types" section will summarize which types of pipelines are being used a
The build steps summary section presents an overview of the individual build steps that are used across all pipelines and how many were automatically converted by Valet.
```md
Total: **29**
Total: **25**
Known: **26 (89%)**
Known: **22 (88%)**
- script: **7**
- install: **6**
- script: **5**
- before_script: **3**
- rvm: **2**
- after_deploy: **2**
- ccache: **1**
- pushover: **1**
- dependencies: **1**
- irc: **1**
- before_deploy: **1**
- php: **1**
- irc: **1**
Unknown: **1 (3%)**
Unknown: **1 (4%)**
- codedeploy: **1**
Unsupported: **2 (6%)**
Unsupported: **2 (8%)**
- sudo: **2**
Actions: **32**
Actions: **28**
- run: **19**
- actions/checkout@v2: **7**
- run: **17**
- actions/checkout@v2: **6**
- ruby/setup-ruby@v1: **2**
- actions/cache@v2: **1**
- desiderati/github-action-pushover@v1: **1**
- shivammathur/setup-php@v2: **1**
- rectalogic/notify-irc@v1: **1**
- shivammathur/setup-php@v2: **1**
- desiderati/github-action-pushover@v1: **1**
```
Here are some key terms that can appear in "Build steps" section:
@@ -291,42 +278,35 @@ The final section of the audit report provides a manifest of all of the files th
```md
### Partially successful
#### valet-travis-labs/deploy-example
#### valet-labs/travisci-php-example
- [valet-travis-labs/deploy-example.yml](valet-travis-labs/deploy-example.yml)
- [valet-travis-labs/deploy-example.config.json](valet-travis-labs/deploy-example.config.json)
- [valet-travis-labs/deploy-example.source.yml](valet-travis-labs/deploy-example.source.yml)
- [valet-labs/travisci-php-example.yml](valet-labs/travisci-php-example.yml)
- [valet-labs/travisci-php-example.config.json](valet-labs/travisci-php-example.config.json)
- [valet-labs/travisci-php-example.source.yml](valet-labs/travisci-php-example.source.yml)
#### valet-travis-labs/c-sharp-example
#### valet-labs/travisci-nodejs-example
- [valet-travis-labs/c-sharp-example.yml](valet-travis-labs/c-sharp-example.yml)
- [valet-travis-labs/c-sharp-example.config.json](valet-travis-labs/c-sharp-example.config.json)
- [valet-travis-labs/c-sharp-example.source.yml](valet-travis-labs/c-sharp-example.source.yml)
- [valet-labs/travisci-nodejs-example.yml](valet-labs/travisci-nodejs-example.yml)
- [valet-labs/travisci-nodejs-example.config.json](valet-labs/travisci-nodejs-example.config.json)
- [valet-labs/travisci-nodejs-example.source.yml](valet-labs/travisci-nodejs-example.source.yml)
#### valet-travis-labs/ruby-example
#### valet-labs/travisci-ruby-example
- [valet-travis-labs/ruby-example.yml](valet-travis-labs/ruby-example.yml)
- [valet-travis-labs/ruby-example.config.json](valet-travis-labs/ruby-example.config.json)
- [valet-travis-labs/ruby-example.source.yml](valet-travis-labs/ruby-example.source.yml)
- [valet-labs/travisci-ruby-example.yml](valet-labs/travisci-ruby-example.yml)
- [valet-labs/travisci-ruby-example.config.json](valet-labs/travisci-ruby-example.config.json)
- [valet-labs/travisci-ruby-example.source.yml](valet-labs/travisci-ruby-example.source.yml)
#### valet-travis-labs/nodejs-example
#### valet-labs/travisci-python-example
- [valet-travis-labs/nodejs-example.yml](valet-travis-labs/nodejs-example.yml)
- [valet-travis-labs/nodejs-example.config.json](valet-travis-labs/nodejs-example.config.json)
- [valet-travis-labs/nodejs-example.source.yml](valet-travis-labs/nodejs-example.source.yml)
- [valet-labs/travisci-python-example.yml](valet-labs/travisci-python-example.yml)
- [valet-labs/travisci-python-example.config.json](valet-labs/travisci-python-example.config.json)
- [valet-labs/travisci-python-example.source.yml](valet-labs/travisci-python-example.source.yml)
#### valet-travis-labs/php-example
- [valet-travis-labs/php-example.yml](valet-travis-labs/php-example.yml)
- [valet-travis-labs/php-example.config.json](valet-travis-labs/php-example.config.json)
- [valet-travis-labs/php-example.source.yml](valet-travis-labs/php-example.source.yml)
#### valet-travis-labs/python
- [valet-travis-labs/python.yml](valet-travis-labs/python.yml)
- [valet-travis-labs/python.config.json](valet-travis-labs/python.config.json)
- [valet-travis-labs/python.source.yml](valet-travis-labs/python.source.yml)
#### valet-labs/travisci-deploy-example
- [valet-labs/travisci-deploy-example.yml](valet-labs/travisci-deploy-example.yml)
- [valet-labs/travisci-deploy-example.config.json](valet-labs/travisci-deploy-example.config.json)
- [valet-labs/travisci-deploy-example.source.yml](valet-labs/travisci-deploy-example.source.yml)
```
Each pipeline will have a variety of files written that include:
@@ -338,4 +318,4 @@ Each pipeline will have a variety of files written that include:
### Next lab
[Perform a dry-run of a Travis CI pipeline](3-dry-run.md)
[Forecast potential build runner usage](3-forecast.md)
@@ -95,6 +95,6 @@ gh valet forecast --source-file-path tmp/**/jobs/*.json -o tmp/combined-forecast
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.
## Next steps
### Next Lab
This concludes all labs for migrating Travis CI pipelines to Actions with Valet!
[Perform a dry-run of a Travis CI pipeline](4-dry-run.md)
+45 -46
View File
@@ -13,7 +13,7 @@ In this lab you will use the `dry-run` command to convert a TravisCI pipeline to
You will be performing a dry-run against a TravisCI project. Answer the following questions before running this command:
1. What pipeline do you want to convert?
- __ruby-example__. This is one of the sample projects avaiable in the TravisCI labs-data organization.
- __travisci-ruby-example__. This is one of the sample projects avaiable in the TravisCI labs-data 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.
@@ -24,16 +24,16 @@ 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 "ruby-example" --output-dir tmp/travis/dry-run-lab
gh valet dry-run travis-ci --travis-ci-repository "travisci-ruby-example" --output-dir tmp/travis/dry-run-lab
```
3. The command will list all the files written to disk when the command succeeds.
![command-result](https://user-images.githubusercontent.com/19557880/190260513-87bae04f-2ff2-4539-b4e5-1e68eba3cf2c.png)
![command-result](https://user-images.githubusercontent.com/19557880/190724470-2936443e-d2f2-41f8-8470-28e313111036.png)
4. View the converted workflow:
- Find `./tmp/travis/dry-run-lab` in the file explorer pane in your codespace.
- Click `ruby-example.yml` to open.
- Click `travisci-ruby-example.yml` to open.
## Inspect the output files
@@ -68,47 +68,46 @@ The files generated from the `dry-run` command represent the equivalent Actions
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-travis-labs/ruby-example
on:
push:
branches:
- "**/*"
pull_request:
concurrency:
# # This item has no matching transformer
# maximum_number_of_builds: 0
jobs:
test:
runs-on: # this agent type is not supported: [[{"dist"=>"trusty"}]]
ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.rvm }}"
# # 'sudo' was not transformed because there is no suitable equivalent in GitHub Actions
- run: gem install bundler
- run: echo "hello!"
strategy:
matrix:
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
test_2:
runs-on: # this agent type is not supported: [[{"dist"=>"trusty"}]]
ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 1.9.3
# # 'sudo' was not transformed because there is no suitable equivalent in GitHub Actions
- run: gem install bundler
- run: echo "child"
name: valet-labs/travisci-ruby-example
on:
push:
branches:
- "**/*"
pull_request:
concurrency:
# # This item has no matching transformer
# maximum_number_of_builds: 0
jobs:
test:
runs-on: # this agent type is not supported: [[{"dist"=>"trusty"}]]
ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.rvm }}"
# # 'sudo' was not transformed because there is no suitable equivalent in GitHub Actions
- run: gem install bundler
- run: echo "hello!"
strategy:
matrix:
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
test_2:
runs-on: # this agent type is not supported: [[{"dist"=>"trusty"}]]
ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 1.9.3
# # 'sudo' was not transformed because there is no suitable equivalent in GitHub Actions
- run: gem install bundler
- run: echo "child"
```
</details>
@@ -117,4 +116,4 @@ Despite these two pipelines using different syntax they will function equivalent
## Next lab
[Use custom transformers to customize Valet's behavior](./4-custom-transformers.md)
[Use custom transformers to customize Valet's behavior](./5-custom-transformers.md)
@@ -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 "deploy-example" --output-dir tmp/travis/dry-run
gh valet dry-run travis-ci --travis-ci-repository "travisci-deploy-example" --output-dir tmp/travis/dry-run
```
The converted workflow that is generated by the above command can be seen below:
@@ -27,45 +27,45 @@ The converted workflow that is generated by the above command can be seen below:
<summary><em>Converted workflow 👇</em></summary>
```yaml
name: valet-travis-labs/deploy-example
on:
push:
branches:
- "**/*"
pull_request:
concurrency:
# # This item has no matching transformer
# maximum_number_of_builds: 0
env:
DB: mysql
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- run: gem install bundler
- run: bundle install --jobs=3 --retry=3
- run: rake
- run: echo 'ready?'
# # This item has no matching transformer
# - codedeploy:
# provider: codedeploy
# access_key_id: YOUR AWS ACCESS KEY
# secret_access_key: YOUR AWS SECRET KEY
# bucket: S3 Bucket
# key: latest/MyApp.zip
# application: MyApp
# deployment_group: MyDeploymentGroup
# if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
- run: "./after_deploy_1.sh"
- run: "./after_deploy_2.sh"
- uses: desiderati/github-action-pushover@v1
with:
job-status: "${{ job.status }}"
pushover-api-token: '12345'
pushover-user-key: "${{ secrets.PUSHOVER_USER_KEY }}"
if: "${{ github.event_name != 'pull_request' }}"
name: valet-labs/travisci-deploy-example
on:
push:
branches:
- "**/*"
pull_request:
concurrency:
# # This item has no matching transformer
# maximum_number_of_builds: 0
env:
DB: mysql
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- run: gem install bundler
- run: bundle install --jobs=3 --retry=3
- run: rake
- run: echo 'ready?'
# # This item has no matching transformer
# - codedeploy:
# provider: codedeploy
# access_key_id: YOUR AWS ACCESS KEY
# secret_access_key: YOUR AWS SECRET KEY
# bucket: S3 Bucket
# key: latest/MyApp.zip
# application: MyApp
# deployment_group: MyDeploymentGroup
# if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
- run: "./after_deploy_1.sh"
- run: "./after_deploy_2.sh"
- uses: desiderati/github-action-pushover@v1
with:
job-status: "${{ job.status }}"
pushover-api-token: '12345'
pushover-user-key: "${{ secrets.PUSHOVER_USER_KEY }}"
if: "${{ github.event_name != 'pull_request' }}"
```
+6 -6
View File
@@ -14,7 +14,7 @@ In this lab, you will use the `migrate` command to convert a Travis CI pipeline
Answer the following questions before running a `migrate` command:
1. What project do you want to migrate?
- __deploy-example__
- __travisci-deploy-example__
2. Where do you want to store the logs?
- __./tmp/migrate__
3. What is the URL for the GitHub repository to add the workflow to?
@@ -25,12 +25,12 @@ 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 "deploy-example"
gh valet 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.
![pr](https://user-images.githubusercontent.com/19557880/190689859-d16a678b-f08f-44c1-a819-780ea967ecaf.png)
![pr](https://user-images.githubusercontent.com/19557880/190726057-f90d31ed-69cc-457b-aab7-3ca21e16df68.png)
3. Open the generated pull request in a new browser tab.
@@ -40,12 +40,12 @@ The first thing to notice about the pull request is that there is a list of manu
Next, you can inspect the "Files changed" in this pull request and see the converted workflow that is being added. Any additional changes or code reviews that were needed should be done in this pull request.
![action-run](https://user-images.githubusercontent.com/19557880/190496147-2f8af72d-51d9-426b-94cf-5d0d7fe02eb3.png)
![action-run](https://user-images.githubusercontent.com/19557880/190726209-dd9ddc54-5ac7-4951-b525-24d76d4378ab.png)
Finally, you can merge the pull request once your review has completed. You can then view the workflow running by selecting the "Actions" menu in the top navigation bar in GitHub.
At this point, the migration has completed and you have successfully migrated a Travis CI pipeline to Actions!
### Next Lab
## Next steps
[Forecast potential build runner usage](6-forecast.md)
This concludes all labs for migrating Travis CI pipelines to Actions with Valet!
+4 -4
View File
@@ -41,10 +41,10 @@ Perform the following labs to test-drive Valet
1. [Configure credentials for Valet](1-configure.md)
2. [Perform an audit of Travis CI](2-audit.md)
3. [Perform a dry-run of a Travis CI pipeline](3-dry-run.md)
4. [Use custom transformers to customize Valet's behavior](4-custom-transformers.md)
5. [Perform a production migration of a Travis CI pipeline](5-migrate.md)
6. [Forecast potential build runner usage](6-forecast.md)
3. [Forecast potential build runner usage](3-forecast.md)
4. [Perform a dry-run of a Travis CI pipeline](4-dry-run.md)
5. [Use custom transformers to customize Valet's behavior](5-custom-transformers.md)
6. [Perform a production migration of a Travis CI pipeline](6-migrate.md)
## Troubleshoot the Valet CLI