2017-02-28 14:09:44 -05:00
|
|
|
# VM Setup - Set up secrets
|
|
|
|
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
Necessary secrets:
|
|
|
|
|
|
|
|
1. `GITHUB_TOKEN`
|
|
|
|
- Used for:
|
|
|
|
- Retrieving open PRs without rate-limiting.
|
|
|
|
- Retrieving PR author.
|
2018-04-05 03:41:27 -04:00
|
|
|
- Retrieving members of the trusted GitHub teams.
|
2017-02-28 14:09:44 -05:00
|
|
|
- Posting comments with preview links on PRs.
|
|
|
|
|
2018-05-09 13:54:53 -04:00
|
|
|
2. `CIRCLE_CI_TOKEN`
|
2017-02-28 14:09:44 -05:00
|
|
|
- Used for:
|
2018-05-09 13:54:53 -04:00
|
|
|
- Retrieving build information.
|
|
|
|
- Downloading build artifacts.
|
2017-02-28 14:09:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Create secrets
|
|
|
|
|
|
|
|
1. `GITHUB_TOKEN`
|
|
|
|
- Visit https://github.com/settings/tokens.
|
|
|
|
- Generate new token with the `public_repo` scope.
|
|
|
|
|
2018-05-09 13:54:53 -04:00
|
|
|
2. `CIRCLE_CI_TOKEN`
|
|
|
|
- Visit https://circleci.com/gh/angular/angular/edit#api
|
|
|
|
- Create an API token with `Build Artifacts` scope
|
2017-02-28 14:09:44 -05:00
|
|
|
|
|
|
|
## Save secrets on the VM
|
|
|
|
|
|
|
|
- `sudo mkdir /aio-secrets`
|
|
|
|
- `sudo touch /aio-secrets/GITHUB_TOKEN`
|
|
|
|
- Insert `<github-token>` into `/aio-secrets/GITHUB_TOKEN`.
|
2018-05-09 13:54:53 -04:00
|
|
|
- `sudo touch /aio-secrets/CIRCLE_CI_TOKEN`
|
|
|
|
- Insert `<access-token>` into `/aio-secrets/CIRCLE_CI_TOKEN`.
|
2017-02-28 14:09:44 -05:00
|
|
|
- `sudo chmod 400 /aio-secrets/*`
|