Get details about the current Continuous Integration environment
npm install @qawolf/ci-infoGet details about the current Continuous Integration environment.
Please open an
issue
if your CI server isn't properly detected :)



``bash`
npm install ci-info --save
`js
var ci = require('ci-info')
if (ci.isCI) {
console.log('The name of the CI server is:', ci.name)
} else {
console.log('This program is not running on a CI server')
}
`
Officially supported CI servers:
| Name | Constant | isPR |
|------|----------|------|
| AWS CodeBuild | ci.CODEBUILD | 🚫 |ci.APPVEYOR
| AppVeyor | | ✅ |ci.AZURE_PIPELINES
| Azure Pipelines | | ✅ |ci.BAMBOO
| Bamboo by Atlassian | | 🚫 |ci.BITBUCKET
| Bitbucket Pipelines | | ✅ |ci.BITRISE
| Bitrise | | ✅ |ci.BUDDY
| Buddy | | ✅ |ci.BUILDKITE
| Buildkite | | ✅ |ci.CIRCLE
| CircleCI | | ✅ |ci.CIRRUS
| Cirrus CI | | ✅ |ci.CODESHIP
| Codeship | | 🚫 |ci.DRONE
| Drone | | ✅ |ci.DSARI
| dsari | | 🚫 |ci.GITHUB_ACTIONS
| GitHub Actions | | ✅ |ci.GITLAB
| GitLab CI | | 🚫 |ci.GOCD
| GoCD | | 🚫 |ci.HUDSON
| Hudson | | 🚫 |ci.JENKINS
| Jenkins CI | | ✅ |ci.MAGNUM
| Magnum CI | | 🚫 |ci.NETLIFY
| Netlify CI | | ✅ |ci.NEVERCODE
| Nevercode | | ✅ |ci.SAIL
| Sail CI | | ✅ |ci.SEMAPHORE
| Semaphore | | ✅ |ci.SHIPPABLE
| Shippable | | ✅ |ci.SOLANO
| Solano CI | | ✅ |ci.STRIDER
| Strider CD | | 🚫 |ci.TASKCLUSTER
| TaskCluster | | 🚫 |ci.TEAMCITY
| TeamCity by JetBrains | | 🚫 |ci.TRAVIS
| Travis CI | | ✅ |
Returns a string containing name of the CI server the code is running on.
If CI server is not detected, it returns null.
Don't depend on the value of this string not to change for a specific
vendor. If you find your self writing ci.name === 'Travis CI', youci.TRAVIS
most likely want to use instead.
Returns a boolean. Will be true if the code is running on a CI server,false
otherwise .
Some CI servers not listed here might still trigger the ci.isCItrue
boolean to be set to if they use certain vendor neutralci.name
environment variables. In those cases will be null and notrue
vendor specific boolean will be set to .
Returns a boolean if PR detection is supported for the current CI server. Will
be true if a PR is being tested, otherwise false. If PR detection isnull
not supported for the current CI server, the value will be .
A vendor specific boolean constant is exposed for each support CI
vendor. A constant will be true if the code is determined to run onfalse
the given CI server, otherwise .
Examples of vendor constants are ci.TRAVIS or ci.APPVEYOR. For a
complete list, see the support table above.
Deprecated vendor constants that will be removed in the next major
release:
- ci.TDDIUM (Solano CI) This have been renamed ci.SOLANO`