|
| 1 | +# Travis-CI Integration |
| 2 | + |
| 3 | +## File Descriptions |
| 4 | + |
| 5 | +* [`.travis.yml`](../.travis.yml) |
| 6 | + The travis job configuration file |
| 7 | +* [`.travis/bintray-settings.xml`](bintray-settings.xml) |
| 8 | + Maven settings file specifically for the deployment phase to Bintray (see [Deployment](#deployment)) |
| 9 | +* [`.travis/mvn`](mvn) |
| 10 | + A wrapper script with options and flags for `mvn` command line tool which are commonly used in Travis-CI |
| 11 | + |
| 12 | +## Job Phases |
| 13 | + |
| 14 | +### Install |
| 15 | + |
| 16 | +Build the code, skip tests and such |
| 17 | + |
| 18 | +### Test (i.e. `script`) |
| 19 | + |
| 20 | +Run tests and collect code coverage. |
| 21 | + |
| 22 | +### After Success |
| 23 | + |
| 24 | +Upload code coverage to Codacy. |
| 25 | + |
| 26 | +**Environment Variables** |
| 27 | + |
| 28 | +| Name | Required | Secure | Description | |
| 29 | +| ---------------------- | :------: | :----: | ----------- | |
| 30 | +| `CODACY_PROJECT_TOKEN` | YES | YES | The token that identifies the target project in Codacy | |
| 31 | + |
| 32 | +### Deployment |
| 33 | + |
| 34 | +Deploy release artifacts to [Bintray](https://bintray.com). |
| 35 | +This phase should be executed only when a tag is pushed. |
| 36 | +Also, since Bintray supports only release versions, if the tag references a snapshot version, this phase will fail. |
| 37 | + |
| 38 | +**Environment Variables** |
| 39 | + |
| 40 | +| Name | Required | Secure | Description | |
| 41 | +| ------------------- | :------: | :----: | ----------- | |
| 42 | +| `BINTRAY_REPO_SLUG` | YES | NO | The slug of the target repository in Bintray. Expected format: `<subject>/<repo>` | |
| 43 | +| `BINTRAY_USER` | YES | NO | The user to use for authentication when uploading the artifacts | |
| 44 | +| `BINTRAY_API_KEY` | YES | YES | The API key of the user, used for authentication | |
| 45 | +| `BINTRAY_PUBLISH` | NO | NO | Whether to publish the artifacts after they were uploaded successfully. Values: `0,1`, default: `0` | |
| 46 | +| `BINTRAY_OVERRIDE` | NO | NO | Whether to override existing artifacts (if any) when uploading. Values: `0,1`, default: `0` | |
| 47 | + |
0 commit comments