Code Monkey home page Code Monkey logo

ci-info's Introduction

ci-info

Get details about the current Continuous Integration environment.

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

Build status js-standard-style

Installation

npm install ci-info --save

Usage

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')
}

Supported CI tools

Officially supported CI servers:

API

ci.name

A string. Will contain the name of the CI server the code is running on. If not CI server is detected, it will be 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', you most likely want to use ci.TRAVIS instead.

ci.isCI

A boolean. Will be true if the code is running on a CI server. Otherwise false.

Some CI servers not listed here might still trigger the ci.isCI boolean to be set to true if they use certain vendor neutral environment variables. In those cases ci.name will be null and no vendor specific boolean will be set to true.

ci.<VENDOR-CONSTANT>

The following vendor specific boolean constants are exposed. A constant will be true if the code is determined to run on the given CI server. Otherwise false.

  • ci.TRAVIS
  • ci.CIRCLE
  • ci.GITLAB
  • ci.APPVEYOR
  • ci.CODESHIP
  • ci.DRONE
  • ci.MAGNUM
  • ci.SEMAPHORE
  • ci.JENKINS
  • ci.BAMBOO
  • ci.TFS (Team Foundation Server)
  • ci.TEAMCITY
  • ci.BUILDKITE
  • ci.HUDSON
  • ci.TASKCLUSTER
  • ci.GOCD
  • ci.BITBUCKET

License

MIT

ci-info's People

Contributors

watson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.