ci-info
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The ci-info
npm package is designed to provide information about the current Continuous Integration environment. This JavaScript library is capable of detecting a variety of CI servers such as AWS CodeBuild, AppVeyor, Azure Pipelines, Bamboo, and many more. If code is running on a CI server, ci-info
will return the name of the CI server, and booleans indicating if the code is running on a CI server (ci.isCI
) and if a PR is being tested (ci.isPR
).
To use ci-info
, you should first install it via npm using the command: npm install ci-info --save
. After the package is installed, it can be used in your JavaScript code. Here's a simple usage example:
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')
}
In this example, ci-info
is required and stored in the variable ci
. It then checks if the code is running on a CI server. If it is, it logs the name of the CI server. If not, it logs that the program is not running on a CI server.
The documentation for ci-info
can be found right in the readme file on its GitHub repository, accessible by visiting https://github.com/watson/ci-info. The readme provides all the necessary information about ci-info
including its installation, usage, supported CI servers, various properties of the CI, and more. It's crucial to consult the documentation for a deep understanding of how the package works and how it can be effectively used in different CI environments.