Skip to content

Commit

Permalink
fix: document value of service key and add links to CI env docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Jan 2, 2018
1 parent a6b4f68 commit b950b1a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ const {isCi, service, commit, build, branch, job, pr, isPr, slug, root} = envCi(

## Supported CI

| Service | `isCi` | `service` | `commit` | `build` | `branch` | `job` | `pr` | `isPr` | `slug` | `root` |
|-------------------------------------------------------------|:------:|:---------:|:--------:|:-------:|:--------:|:-----:|:----:|:------:|:------:|:------:|
| [AppVeyor](https://www.appveyor.com) | | |||||||||
| [Buildkite](https://buildkite.com) | | |||||||||
| [Circleci](https://circleci.com) | | |||||||||
| [Codeship](https://codeship.com) || |||||||||
| [Drone](http://try.drone.io) | | |||||||||
| [Gitlab CI](https://about.gitlab.com/features/gitlab-ci-cd) | | |||||||||
| [Jenkins](https://jenkins-ci.org) || |||||||||
| [Semaphore](https://semaphoreci.com) | | |||||||||
| [Shippable](https://www.shippable.com) | | |||||||||
| [Travis](https://travis-ci.org/) | | |||||||||
| [Wercker](http://www.wercker.com/) || |||||||||
| CI Service | `service` | `isCi` | `commit` | `build` | `branch` | `job` | `pr` | `isPr` | `slug` | `root` |
|-----------------------------------------------------------------------------------------------------------|:-----------:|:------:|:--------:|:-------:|:--------:|:-----:|:----:|:------:|:------:|:------:|
| [AppVeyor]( https://www.appveyor.com/docs/environment-variables) | `appveyor` | |||||||||
| [Buildkite](https://buildkite.com/docs/builds/environment-variables) | `buildkite` ||||||||||
| [Circleci](https://circleci.com/docs/1.0/environment-variables) | `circleci` | |||||||||
| [Codeship](https://documentation.codeship.com/basic/builds-and-configuration/set-environment-variables) | `codeship` | |||||||||
| [Drone](http://readme.drone.io/0.5/usage/environment-reference) | `drone` | |||||||||
| [Gitlab CI](https://docs.gitlab.com/ce/ci/variables/README.html) | `gitlab` | |||||||||
| [Jenkins](https://wiki.jenkins.io/display/JENKINS/Building+a+software+project) | `jenkins` | |||||||||
| [Semaphore](https://semaphoreci.com/docs/available-environment-variables.html) | `semaphore` | |||||||||
| [Shippable](http://docs.shippable.com/ci/env-vars/#stdEnv) | `shippable` ||||||||||
| [Travis](https://docs.travis-ci.com/user/environment-variables) | `travis` | |||||||||
| [Wercker](http://devcenter.wercker.com/docs/environment-variables/available-env-vars#hs_cos_wrapper_name) | `wercker` | |||||||||

If none of the above CI services is detected, `commit` and `branch` are determined based on the local Git repository, and `isCi` is determined based on the `CI` environment variable.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const git = require('./lib/git');

const services = {
travis: require('./lib/travis'),
circle: require('./lib/circle'),
circleci: require('./lib/circleci'),
appveyor: require('./lib/appveyor'),
wercker: require('./lib/wercker'),
codeship: require('./lib/codeship'),
Expand Down
2 changes: 1 addition & 1 deletion lib/appveyor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://www.appveyor.com/docs/environment-variables/
// https://www.appveyor.com/docs/environment-variables

module.exports = {
detect() {
Expand Down
2 changes: 1 addition & 1 deletion lib/circle.js → lib/circleci.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://circleci.com/docs/1.0/environment-variables/
// https://circleci.com/docs/1.0/environment-variables

module.exports = {
detect() {
Expand Down
2 changes: 1 addition & 1 deletion lib/codeship.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://documentation.codeship.com/basic/builds-and-configuration/set-environment-variables/
// https://documentation.codeship.com/basic/builds-and-configuration/set-environment-variables

module.exports = {
detect() {
Expand Down
2 changes: 1 addition & 1 deletion lib/drone.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// http://readme.drone.io/0.5/usage/environment-reference/
// http://readme.drone.io/0.5/usage/environment-reference

module.exports = {
detect() {
Expand Down
2 changes: 1 addition & 1 deletion lib/travis.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://docs.travis-ci.com/user/environment-variables/
// https://docs.travis-ci.com/user/environment-variables

module.exports = {
detect() {
Expand Down
2 changes: 1 addition & 1 deletion test/circle.test.js → test/circleci.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import test from 'ava';
import circle from '../lib/circle';
import circle from '../lib/circleci';

test('Push', t => {
process.env.CIRCLECI = 'true';
Expand Down

0 comments on commit b950b1a

Please sign in to comment.