Get details about the current Continuous Integration environment
npm install 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 |
| ------------------------------------------------------------------------------- | ----------------------- | ---- |
| Agola CI | ci.AGOLA | ✅ |ci.ALPIC
| Alpic | | 🚫 |ci.APPCIRCLE
| Appcircle | | ✅ |ci.APPVEYOR
| AppVeyor | | ✅ |ci.CODEBUILD
| AWS CodeBuild | | ✅ |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.CLOUDFLARE_PAGES
| Cloudflare Pages | | 🚫 |ci.CLOUDFLARE_WORKERS
| Cloudflare Workers | | 🚫 |ci.CODEFRESH
| Codefresh | | ✅ |ci.CODESHIP
| Codeship | | 🚫 |ci.DRONE
| Drone | | ✅ |ci.DSARI
| dsari | | 🚫 |ci.EARTHLY
| Earthly CI | | 🚫 |ci.EAS
| Expo Application Services | | 🚫 |ci.GERRIT
| Gerrit CI | | 🚫 |ci.GITHUB_ACTIONS
| GitHub Actions | | ✅ |ci.GITLAB
| GitLab CI | | ✅ |ci.GITEA_ACTIONS
| Gitea Actions | | 🚫 |ci.GOCD
| GoCD | | 🚫 |ci.GOOGLE_CLOUD_BUILD
| Google Cloud Build | | 🚫 |ci.HARNESS
| Harness CI | | 🚫 |ci.HEROKU
| Heroku | | 🚫 |ci.HUDSON
| Hudson | | 🚫 |ci.JENKINS
| Jenkins CI | | ✅ |ci.LAYERCI
| LayerCI | | ✅ |ci.MAGNUM
| Magnum CI | | 🚫 |ci.NETLIFY
| Netlify CI | | ✅ |ci.NEVERCODE
| Nevercode | | ✅ |ci.PROW
| Prow | | 🚫 |ci.RELEASEHUB
| ReleaseHub | | 🚫 |ci.RENDER
| Render | | ✅ |ci.SAIL
| Sail CI | | ✅ |ci.SCREWDRIVER
| Screwdriver | | ✅ |ci.SEMAPHORE
| Semaphore | | ✅ |ci.SOURCEHUT
| Sourcehut | | 🚫 |ci.STRIDER
| Strider CD | | 🚫 |ci.TASKCLUSTER
| TaskCluster | | 🚫 |ci.TEAMCITY
| TeamCity by JetBrains | | 🚫 |ci.TRAVIS
| Travis CI | | ✅ |ci.VELA
| Vela | | ✅ |ci.VERCEL
| Vercel | | ✅ |ci.APPCENTER
| Visual Studio App Center | | 🚫 |ci.WOODPECKER
| Woodpecker | | ✅ |
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.
To disable CI checks and vendor assertion, set the environment variable
```
CI=false
ci-info has been ported to the following languages
| Language | Repository |
|----------|------------|
| Go | https://github.com/hofstadter-io/cinful |
| Rust | https://github.com/sagiegurari/ci_info |
| Kotlin | https://github.com/cloudflightio/ci-info |