is-ci

Detect if the current environment is a CI server

  • Owner: watson/is-ci
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

is-ci

Returns true if the current environment is a Continuous Integration
server.

Please open an issue if your
CI server isn't properly detected :)

npm
Build status
js-standard-style

Installation

npm install is-ci --save

Programmatic Usage

const isCI = require('is-ci')

if (isCI) {
  console.log('The code is running on a CI server')
}

CLI Usage

For CLI usage you need to have the is-ci executable in your PATH.
There's a few ways to do that:

  • Either install the module globally using npm install is-ci -g
  • Or add the module as a dependency to your app in which case it can be
    used inside your package.json scripts as is
  • Or provide the full path to the executable, e.g.
    ./node_modules/.bin/is-ci
is-ci && echo "This is a CI server"

Supported CI tools

Refer to ci-info docs for all supported CI's

License

MIT

Main metrics

Overview
Name With Ownerwatson/is-ci
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2015-10-07 23:37:23
Pushed At2024-12-08 08:22:17
Last Commit At2024-12-08 13:51:59
Release Count19
Last Release Namev4.1.0 (Posted on )
First Release Namev1.0.0 (Posted on )
用户参与
Stargazers Count395
Watchers Count6
Fork Count17
Commits Count86
Has Issues Enabled
Issues Count9
Issue Open Count0
Pull Requests Count12
Pull Requests Open Count0
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private