2020-04-22 09:08:58 -07:00
|
|
|
# Continuous Integration
|
|
|
|
|
|
|
|
In order to ensure code changes comply with the target integrations, the following policies should be observed.
|
|
|
|
|
|
|
|
## Changes to the GitHub project
|
|
|
|
|
|
|
|
The `master` branch is the git repositories default branch.
|
|
|
|
|
2020-06-19 07:43:16 -07:00
|
|
|
Jobs are managed by PR labels. The following labels are actionable.
|
2020-04-22 09:08:58 -07:00
|
|
|
|
2020-06-19 07:43:16 -07:00
|
|
|
|label|targets|
|
|
|
|
|----|---|
|
|
|
|
|`safe-to-ci`| `ciBuild`, `ciLintPr`
|
2020-04-22 09:08:58 -07:00
|
|
|
|
|
|
|
### Code changes to the master branch
|
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
These changes are identified by modifications to files under the `src` directory or files matching `^.*\.(gradle|toml)$`
|
2020-04-22 09:08:58 -07:00
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
- build the project
|
|
|
|
- save artifacts to GCP bucket with short git hash, and `master`
|
|
|
|
- update code documentation via `docs` gradle target
|
2020-04-22 09:08:58 -07:00
|
|
|
|
|
|
|
### New tag is created
|
|
|
|
|
|
|
|
- build the project, save artifacts to GCP bucket with tag
|
2020-05-13 10:41:39 -07:00
|
|
|
- push artifacts to bintray
|
2020-04-22 09:08:58 -07:00
|
|
|
- send notification to Slack channel
|
|
|
|
|
|
|
|
## Time based changes
|
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
Periodic continous integration tasks
|
2020-04-22 09:08:58 -07:00
|
|
|
|
|
|
|
### Nightly
|
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
- run integration tests
|
|
|
|
- send notifications for failed builds or failed nightly integrations
|
|
|
|
|
|
|
|
## Targets
|
2020-04-22 09:08:58 -07:00
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
Run gradle targets with the following command.
|
|
|
|
Note: it is recommended to NOT install `gradle` because the wrapper command (gradlew) takes care of that automatically.
|
|
|
|
```
|
|
|
|
./gradlew <target>
|
|
|
|
```
|
|
|
|
Where `<target>` is one of the following
|
2020-04-22 09:08:58 -07:00
|
|
|
|
2020-05-13 10:41:39 -07:00
|
|
|
- **ciBuild** : build the project and produce the AAR artifact under `build/outputs/aar`
|
|
|
|
- **ciDeploy** : deploy the AAR artifact to bintray. This will invoke **ciBuild**, if necessary.
|
|
|
|
- **ciLintPr** : lint the code in response to a PR to verify codestyle and formatting.
|
|
|
|
- **ciTestPr** : run the basic PR test suite. This will invoke **ciBuild**, if necessary.
|
|
|
|
- **ciTestNightly** : run the full nightly integration test suite
|