.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / ci-info / README.md
1 # ci-info
2
3 Get details about the current Continuous Integration environment.
4
5 Please [open an
6 issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md)
7 if your CI server isn't properly detected :)
8
9 [![npm](https://img.shields.io/npm/v/ci-info.svg)](https://www.npmjs.com/package/ci-info)
10 [![Build status](https://travis-ci.org/watson/ci-info.svg?branch=master)](https://travis-ci.org/watson/ci-info)
11 [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
12
13 ## Installation
14
15 ```bash
16 npm install ci-info --save
17 ```
18
19 ## Usage
20
21 ```js
22 var ci = require('ci-info')
23
24 if (ci.isCI) {
25   console.log('The name of the CI server is:', ci.name)
26 } else {
27   console.log('This program is not running on a CI server')
28 }
29 ```
30
31 ## Supported CI tools
32
33 Officially supported CI servers:
34
35 | Name | Constant |
36 |------|----------|
37 | [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` |
38 | [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` |
39 | [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` |
40 | [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` |
41 | [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` |
42 | [Buddy](https://buddy.works/) | `ci.BUDDY` |
43 | [Buildkite](https://buildkite.com) | `ci.BUILDKITE` |
44 | [CircleCI](http://circleci.com) | `ci.CIRCLE` |
45 | [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` |
46 | [Codeship](https://codeship.com) | `ci.CODESHIP` |
47 | [Drone](https://drone.io) | `ci.DRONE` |
48 | [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` |
49 | [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` |
50 | [GoCD](https://www.go.cd/) | `ci.GOCD` |
51 | [Hudson](http://hudson-ci.org) | `ci.HUDSON` |
52 | [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` |
53 | [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` |
54 | [Sail CI](https://sail.ci/) | `ci.SAIL` |
55 | [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` |
56 | [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` |
57 | [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` |
58 | [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` |
59 | [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` |
60 | [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft | `ci.TFS` |
61 | [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` |
62 | [Travis CI](http://travis-ci.org) | `ci.TRAVIS` |
63
64 ## API
65
66 ### `ci.name`
67
68 A string. Will contain the name of the CI server the code is running on.
69 If not CI server is detected, it will be `null`.
70
71 Don't depend on the value of this string not to change for a specific
72 vendor. If you find your self writing `ci.name === 'Travis CI'`, you
73 most likely want to use `ci.TRAVIS` instead.
74
75 ### `ci.isCI`
76
77 A boolean. Will be `true` if the code is running on a CI server.
78 Otherwise `false`.
79
80 Some CI servers not listed here might still trigger the `ci.isCI`
81 boolean to be set to `true` if they use certain vendor neutral
82 environment variables. In those cases `ci.name` will be `null` and no
83 vendor specific boolean will be set to `true`.
84
85 ### `ci.isPR`
86
87 A boolean if PR detection is supported for the current CI server. Will
88 be `true` if a PR is being tested. Otherwise `false`. If PR detection is
89 not supported for the current CI server, the value will be `null`.
90
91 ### `ci.<VENDOR-CONSTANT>`
92
93 A vendor specific boolean constants is exposed for each support CI
94 vendor. A constant will be `true` if the code is determined to run on
95 the given CI server.  Otherwise `false`.
96
97 Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a
98 complete list, see the support table above.
99
100 Deprecated vendor constants that will be removed in the next major
101 release:
102
103 - `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO`
104
105 ## License
106
107 [MIT](LICENSE)