basant307/AI_Governance_Project
048
1# ci-info2 3Get details about the current Continuous Integration environment.4 5Please [open an6issue](https://github.com/watson/ci-info/issues/new?template=ci-server-not-detected.md)7if your CI server isn't properly detected :)8 9[](https://www.npmjs.com/package/ci-info)10[](https://github.com/watson/ci-info/actions)11[](https://github.com/feross/standard)12 13## Installation14 15```bash16npm install ci-info --save17```18 19## Usage20 21```js22var ci = require('ci-info')23 24if (ci.isCI) {25 console.log('The name of the CI server is:', ci.name)26} else {27 console.log('This program is not running on a CI server')28}29```30 31## Supported CI tools32 33Officially supported CI servers:34 35| Name | Constant | isPR |36| ------------------------------------------------------------------------------- | ----------------------- | ---- |37| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | ๐ซ |38| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | โ
|39| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | โ
|40| [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` | ๐ซ |41| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | ๐ซ |42| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | โ
|43| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | โ
|44| [Buddy](https://buddy.works/) | `ci.BUDDY` | โ
|45| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | โ
|46| [CircleCI](http://circleci.com) | `ci.CIRCLE` | โ
|47| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | โ
|48| [Codefresh](https://codefresh.io/) | `ci.CODEFRESH` | โ
|49| [Codeship](https://codeship.com) | `ci.CODESHIP` | ๐ซ |50| [Drone](https://drone.io) | `ci.DRONE` | โ
|51| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | ๐ซ |52| [Expo Application Services](https://expo.dev/eas) | `ci.EAS` | ๐ซ |53| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | ๐ซ |54| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` | โ
|55| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | โ
|56| [GoCD](https://www.go.cd/) | `ci.GOCD` | ๐ซ |57| [Google Cloud Build](https://cloud.google.com/build) | `ci.GOOGLE_CLOUD_BUILD` | ๐ซ |58| [Harness CI](https://www.harness.io/products/continuous-integration) | `ci.HARNESS` | ๐ซ |59| [Heroku](https://www.heroku.com) | `ci.HEROKU` | ๐ซ |60| [Hudson](http://hudson-ci.org) | `ci.HUDSON` | ๐ซ |61| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | โ
|62| [LayerCI](https://layerci.com/) | `ci.LAYERCI` | โ
|63| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | ๐ซ |64| [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | โ
|65| [Nevercode](http://nevercode.io/) | `ci.NEVERCODE` | โ
|66| [ReleaseHub](https://releasehub.com/) | `ci.RELEASEHUB` | ๐ซ |67| [Render](https://render.com/) | `ci.RENDER` | โ
|68| [Sail CI](https://sail.ci/) | `ci.SAIL` | โ
|69| [Screwdriver](https://screwdriver.cd/) | `ci.SCREWDRIVER` | โ
|70| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | โ
|71| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | โ
|72| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | โ
|73| [Sourcehut](https://sourcehut.org/) | `ci.SOURCEHUT` | ๐ซ |74| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | ๐ซ |75| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | ๐ซ |76| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | ๐ซ |77| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | โ
|78| [Vercel](https://vercel.com/) | `ci.VERCEL` | โ
|79| [Visual Studio App Center](https://appcenter.ms/) | `ci.APPCENTER` | ๐ซ |80| [Woodpecker](https://woodpecker-ci.org/) | `ci.WOODPECKER` | โ
|81 82## API83 84### `ci.name`85 86Returns a string containing name of the CI server the code is running on.87If CI server is not detected, it returns `null`.88 89Don't depend on the value of this string not to change for a specific90vendor. If you find your self writing `ci.name === 'Travis CI'`, you91most likely want to use `ci.TRAVIS` instead.92 93### `ci.isCI`94 95Returns a boolean. Will be `true` if the code is running on a CI server,96otherwise `false`.97 98Some CI servers not listed here might still trigger the `ci.isCI`99boolean to be set to `true` if they use certain vendor neutral100environment variables. In those cases `ci.name` will be `null` and no101vendor specific boolean will be set to `true`.102 103### `ci.isPR`104 105Returns a boolean if PR detection is supported for the current CI server. Will106be `true` if a PR is being tested, otherwise `false`. If PR detection is107not supported for the current CI server, the value will be `null`.108 109### `ci.<VENDOR-CONSTANT>`110 111A vendor specific boolean constant is exposed for each support CI112vendor. A constant will be `true` if the code is determined to run on113the given CI server, otherwise `false`.114 115Examples of vendor constants are `ci.TRAVIS` or `ci.APPVEYOR`. For a116complete list, see the support table above.117 118Deprecated vendor constants that will be removed in the next major119release:120 121- `ci.TDDIUM` (Solano CI) This have been renamed `ci.SOLANO`122 123## Ports124 125ci-info has been ported to the following languages126 127| Language | Repository |128|----------|------------|129| Go | https://github.com/hofstadter-io/cinful |130| Rust | https://github.com/sagiegurari/ci_info |131| Kotlin | https://github.com/cloudflightio/ci-info |132 133## License134 135[MIT](LICENSE)136 