diff --git a/README.md b/README.md index 80300ab..548e251 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ if (isCI) { | [Semaphore](https://semaphoreci.com/docs/available-environment-variables.html) | `semaphore` | :white_check_mark: | [:warning:](#semaphore) | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | [Shippable](http://docs.shippable.com/ci/env-vars/#stdEnv) | `shippable` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | [TeamCity](https://confluence.jetbrains.com/display/TCD10/Predefined+Build+Parameters) | `teamcity` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | -| [Travis CI](https://docs.travis-ci.com/user/environment-variables#default-environment-variables) | `travis` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| [Travis CI](https://docs.travis-ci.com/user/environment-variables#default-environment-variables) | `travis` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | [Visual Studio Team Services](https://docs.microsoft.com/en-us/vsts/pipelines/build/variables) | `vsts` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | | [Wercker](http://devcenter.wercker.com/docs/environment-variables/available-env-vars#hs_cos_wrapper_name) | `wercker` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | diff --git a/services/travis.js b/services/travis.js index 0a60461..cbf81b0 100644 --- a/services/travis.js +++ b/services/travis.js @@ -14,8 +14,10 @@ module.exports = { commit: env.TRAVIS_COMMIT, tag: env.TRAVIS_TAG, build: env.TRAVIS_BUILD_NUMBER, + buildUrl: env.TRAVIS_BUILD_WEB_URL, branch: env.TRAVIS_BRANCH, job: env.TRAVIS_JOB_NUMBER, + jobUrl: env.TRAVIS_JOB_WEB_URL, pr, isPr, prBranch: env.TRAVIS_PULL_REQUEST_BRANCH, diff --git a/test/services/travis.test.js b/test/services/travis.test.js index ca77500..a2ca497 100644 --- a/test/services/travis.test.js +++ b/test/services/travis.test.js @@ -4,9 +4,11 @@ import travis from '../../services/travis'; const env = { TRAVIS: 'true', TRAVIS_JOB_NUMBER: '1234', + TRAVIS_JOB_WEB_URL: 'https://travis-ci.com/owner/repo/jobs/1234', TRAVIS_COMMIT: '5678', TRAVIS_TAG: 'tag_name', TRAVIS_BUILD_NUMBER: '91011', + TRAVIS_BUILD_WEB_URL: 'https://travis-ci.com/owner/repo/builds/91011', TRAVIS_BRANCH: 'master', TRAVIS_PULL_REQUEST: 'false', TRAVIS_BUILD_DIR: '/', @@ -20,9 +22,11 @@ test('Push', t => { commit: '5678', tag: 'tag_name', build: '91011', + buildUrl: 'https://travis-ci.com/owner/repo/builds/91011', branch: 'master', root: '/', job: '1234', + jobUrl: 'https://travis-ci.com/owner/repo/jobs/1234', pr: undefined, isPr: false, prBranch: undefined, @@ -41,9 +45,11 @@ test('PR', t => { commit: '5678', tag: 'tag_name', build: '91011', + buildUrl: 'https://travis-ci.com/owner/repo/builds/91011', branch: 'master', root: '/', job: '1234', + jobUrl: 'https://travis-ci.com/owner/repo/jobs/1234', pr: '10', isPr: true, prBranch: 'pr-branch',