Comparing version 3.5.0 to 3.6.0
# Changelog | ||
## v3.6.0 | ||
This release attempts to bring parity with [@npmcli/ci-detect](https://github.com/npm/ci-detect). See [#95](https://github.com/watson/ci-info/pull/95) for more details. | ||
- support gerrit ([#95](https://github.com/watson/ci-info/pull/95)) | ||
- support google cloud build ([#95](https://github.com/watson/ci-info/pull/95)) | ||
- support heroku ([#95](https://github.com/watson/ci-info/pull/95)) | ||
- support anonymous CI's that exposes BUILD_ID and CI_NAME env vars ([#95](https://github.com/watson/ci-info/pull/95)) | ||
- support more vercel environments ([#95](https://github.com/watson/ci-info/pull/95)) | ||
## v3.5.0 | ||
@@ -4,0 +14,0 @@ |
@@ -44,5 +44,8 @@ /** | ||
export const EAS: boolean; | ||
export const GERRIT: boolean; | ||
export const GITHUB_ACTIONS: boolean; | ||
export const GITLAB: boolean; | ||
export const GOCD: boolean; | ||
export const GOOGLE_CLOUD_BUILD: boolean; | ||
export const HEROKU boolean; | ||
export const HUDSON: boolean; | ||
@@ -49,0 +52,0 @@ export const JENKINS: boolean; |
20
index.js
@@ -57,8 +57,10 @@ 'use strict' | ||
exports.isCI = !!( | ||
env.BUILD_ID || // Jenkins, Cloudbees | ||
env.BUILD_NUMBER || // Jenkins, TeamCity | ||
env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari | ||
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI | ||
env.BUILD_NUMBER || // Jenkins, TeamCity | ||
env.CI_APP_ID || // Appflow | ||
env.CI_BUILD_ID || // Appflow | ||
env.CI_BUILD_NUMBER || // Appflow | ||
env.CI_NAME || // Codeship and others | ||
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI | ||
env.RUN_ID || // TaskCluster, dsari | ||
@@ -70,3 +72,17 @@ exports.name || | ||
function checkEnv (obj) { | ||
// "env": "CIRRUS" | ||
if (typeof obj === 'string') return !!env[obj] | ||
// "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } | ||
if ('env' in obj) { | ||
// Currently there are no other types, uncomment when there are | ||
// if ('includes' in obj) { | ||
return env[obj.env] && env[obj.env].includes(obj.includes) | ||
// } | ||
} | ||
if ('any' in obj) { | ||
return obj.any.some(function (k) { | ||
return !!env[k] | ||
}) | ||
} | ||
return Object.keys(obj).every(function (k) { | ||
@@ -73,0 +89,0 @@ return env[k] === obj[k] |
{ | ||
"name": "ci-info", | ||
"version": "3.5.0", | ||
"version": "3.6.0", | ||
"description": "Get details about the current Continuous Integration environment", | ||
@@ -32,4 +32,7 @@ "main": "index.js", | ||
"standard": "^17.0.0", | ||
"tape": "^5.6.0" | ||
"tape": "^5.6.1" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
} | ||
} |
@@ -35,42 +35,45 @@ # ci-info | ||
| Name | Constant | isPR | | ||
| ------------------------------------------------------------------------------- | -------------------- | ---- | | ||
| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | 🚫 | | ||
| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ | | ||
| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | ✅ | | ||
| [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` | 🚫 | | ||
| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | 🚫 | | ||
| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | ✅ | | ||
| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | ✅ | | ||
| [Buddy](https://buddy.works/) | `ci.BUDDY` | ✅ | | ||
| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | ✅ | | ||
| [CircleCI](http://circleci.com) | `ci.CIRCLE` | ✅ | | ||
| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | ✅ | | ||
| [Codefresh](https://codefresh.io/) | `ci.CODEFRESH` | ✅ | | ||
| [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 | | ||
| [Drone](https://drone.io) | `ci.DRONE` | ✅ | | ||
| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 | | ||
| [Expo Application Services](https://expo.dev/eas) | `ci.EAS` | 🚫 | | ||
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` | ✅ | | ||
| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | ✅ | | ||
| [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 | | ||
| [Hudson](http://hudson-ci.org) | `ci.HUDSON` | 🚫 | | ||
| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | ✅ | | ||
| [LayerCI](https://layerci.com/) | `ci.LAYERCI` | ✅ | | ||
| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 | | ||
| [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | ✅ | | ||
| [Nevercode](http://nevercode.io/) | `ci.NEVERCODE` | ✅ | | ||
| [Render](https://render.com/) | `ci.RENDER` | ✅ | | ||
| [Sail CI](https://sail.ci/) | `ci.SAIL` | ✅ | | ||
| [Screwdriver](https://screwdriver.cd/) | `ci.SCREWDRIVER` | ✅ | | ||
| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | ✅ | | ||
| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | ✅ | | ||
| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | ✅ | | ||
| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 | | ||
| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 | | ||
| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 | | ||
| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | ✅ | | ||
| [Vercel](https://vercel.com/) | `ci.VERCEL` | 🚫 | | ||
| [Visual Studio App Center](https://appcenter.ms/) | `ci.APPCENTER` | 🚫 | | ||
| [Woodpecker](https://woodpecker-ci.org/) | `ci.WOODPECKER` | ✅ | | ||
| Name | Constant | isPR | | ||
| ------------------------------------------------------------------------------- | -------------------- | ---- | | ||
| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | 🚫 | | ||
| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ | | ||
| [Azure Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) | `ci.AZURE_PIPELINES` | ✅ | | ||
| [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` | 🚫 | | ||
| [Bamboo](https://www.atlassian.com/software/bamboo) by Atlassian | `ci.BAMBOO` | 🚫 | | ||
| [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) | `ci.BITBUCKET` | ✅ | | ||
| [Bitrise](https://www.bitrise.io/) | `ci.BITRISE` | ✅ | | ||
| [Buddy](https://buddy.works/) | `ci.BUDDY` | ✅ | | ||
| [Buildkite](https://buildkite.com) | `ci.BUILDKITE` | ✅ | | ||
| [CircleCI](http://circleci.com) | `ci.CIRCLE` | ✅ | | ||
| [Cirrus CI](https://cirrus-ci.org) | `ci.CIRRUS` | ✅ | | ||
| [Codefresh](https://codefresh.io/) | `ci.CODEFRESH` | ✅ | | ||
| [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 | | ||
| [Drone](https://drone.io) | `ci.DRONE` | ✅ | | ||
| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 | | ||
| [Expo Application Services](https://expo.dev/eas) | `ci.EAS` | 🚫 | | ||
| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | 🚫 | | ||
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` | ✅ | | ||
| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` | ✅ | | ||
| [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 | | ||
| [Google Cloud Build](https://cloud.google.com/build) | `ci.GOOGLE_CLOUD_BUILD` | 🚫 | | ||
| [Heroku](https://www.heroku.com) | `ci.HEROKU` | 🚫 | | ||
| [Hudson](http://hudson-ci.org) | `ci.HUDSON` | 🚫 | | ||
| [Jenkins CI](https://jenkins-ci.org) | `ci.JENKINS` | ✅ | | ||
| [LayerCI](https://layerci.com/) | `ci.LAYERCI` | ✅ | | ||
| [Magnum CI](https://magnum-ci.com) | `ci.MAGNUM` | 🚫 | | ||
| [Netlify CI](https://www.netlify.com/) | `ci.NETLIFY` | ✅ | | ||
| [Nevercode](http://nevercode.io/) | `ci.NEVERCODE` | ✅ | | ||
| [Render](https://render.com/) | `ci.RENDER` | ✅ | | ||
| [Sail CI](https://sail.ci/) | `ci.SAIL` | ✅ | | ||
| [Screwdriver](https://screwdriver.cd/) | `ci.SCREWDRIVER` | ✅ | | ||
| [Semaphore](https://semaphoreci.com) | `ci.SEMAPHORE` | ✅ | | ||
| [Shippable](https://www.shippable.com/) | `ci.SHIPPABLE` | ✅ | | ||
| [Solano CI](https://www.solanolabs.com/) | `ci.SOLANO` | ✅ | | ||
| [Strider CD](https://strider-cd.github.io/) | `ci.STRIDER` | 🚫 | | ||
| [TaskCluster](http://docs.taskcluster.net) | `ci.TASKCLUSTER` | 🚫 | | ||
| [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains | `ci.TEAMCITY` | 🚫 | | ||
| [Travis CI](http://travis-ci.org) | `ci.TRAVIS` | ✅ | | ||
| [Vercel](https://vercel.com/) | `ci.VERCEL` | 🚫 | | ||
| [Visual Studio App Center](https://appcenter.ms/) | `ci.APPCENTER` | 🚫 | | ||
| [Woodpecker](https://woodpecker-ci.org/) | `ci.WOODPECKER` | ✅ | | ||
@@ -126,2 +129,3 @@ ## API | ||
| Rust | https://github.com/sagiegurari/ci_info | | ||
| Kotlin | https://github.com/cloudflightio/ci-info | | ||
@@ -128,0 +132,0 @@ ## License |
[ | ||
{ | ||
"name": "Appcircle", | ||
"constant": "APPCIRCLE", | ||
"env": "AC_APPCIRCLE" | ||
}, | ||
{ | ||
"name": "AppVeyor", | ||
@@ -9,2 +14,7 @@ "constant": "APPVEYOR", | ||
{ | ||
"name": "AWS CodeBuild", | ||
"constant": "CODEBUILD", | ||
"env": "CODEBUILD_BUILD_ARN" | ||
}, | ||
{ | ||
"name": "Azure Pipelines", | ||
@@ -16,7 +26,2 @@ "constant": "AZURE_PIPELINES", | ||
{ | ||
"name": "Appcircle", | ||
"constant": "APPCIRCLE", | ||
"env": "AC_APPCIRCLE" | ||
}, | ||
{ | ||
"name": "Bamboo", | ||
@@ -63,2 +68,8 @@ "constant": "BAMBOO", | ||
{ | ||
"name": "Codefresh", | ||
"constant": "CODEFRESH", | ||
"env": "CF_BUILD_ID", | ||
"pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } | ||
}, | ||
{ | ||
"name": "Codemagic", | ||
@@ -70,13 +81,2 @@ "constant": "CODEMAGIC", | ||
{ | ||
"name": "AWS CodeBuild", | ||
"constant": "CODEBUILD", | ||
"env": "CODEBUILD_BUILD_ARN" | ||
}, | ||
{ | ||
"name": "Codefresh", | ||
"constant": "CODEFRESH", | ||
"env": "CF_BUILD_ID", | ||
"pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] } | ||
}, | ||
{ | ||
"name": "Codeship", | ||
@@ -93,8 +93,2 @@ "constant": "CODESHIP", | ||
{ | ||
"name": "Woodpecker", | ||
"constant": "WOODPECKER", | ||
"env": { "CI": "woodpecker" }, | ||
"pr": { "CI_BUILD_EVENT": "pull_request" } | ||
}, | ||
{ | ||
"name": "dsari", | ||
@@ -127,2 +121,7 @@ "constant": "DSARI", | ||
{ | ||
"name": "Google Cloud Build", | ||
"constant": "GOOGLE_CLOUD_BUILD", | ||
"env": "BUILDER_OUTPUT" | ||
}, | ||
{ | ||
"name": "LayerCI", | ||
@@ -134,2 +133,12 @@ "constant": "LAYERCI", | ||
{ | ||
"name": "Gerrit", | ||
"constant": "GERRIT", | ||
"env": "GERRIT_PROJECT" | ||
}, | ||
{ | ||
"name": "Heroku", | ||
"constant": "HEROKU", | ||
"env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } | ||
}, | ||
{ | ||
"name": "Hudson", | ||
@@ -175,2 +184,8 @@ "constant": "HUDSON", | ||
{ | ||
"name": "Screwdriver", | ||
"constant": "SCREWDRIVER", | ||
"env": "SCREWDRIVER", | ||
"pr": { "env": "SD_PULL_REQUEST", "ne": "false" } | ||
}, | ||
{ | ||
"name": "Semaphore", | ||
@@ -182,8 +197,2 @@ "constant": "SEMAPHORE", | ||
{ | ||
"name": "Screwdriver", | ||
"constant": "SCREWDRIVER", | ||
"env": "SCREWDRIVER", | ||
"pr": { "env": "SD_PULL_REQUEST", "ne": "false" } | ||
}, | ||
{ | ||
"name": "Shippable", | ||
@@ -224,3 +233,3 @@ "constant": "SHIPPABLE", | ||
"constant": "VERCEL", | ||
"env": "NOW_BUILDER" | ||
"env": { "any": ["NOW_BUILDER", "VERCEL_URL"] } | ||
}, | ||
@@ -233,2 +242,8 @@ { | ||
{ | ||
"name": "Woodpecker", | ||
"constant": "WOODPECKER", | ||
"env": { "CI": "woodpecker" }, | ||
"pr": { "CI_BUILD_EVENT": "pull_request" } | ||
}, | ||
{ | ||
"name": "Xcode Cloud", | ||
@@ -235,0 +250,0 @@ "constant": "XCODE_CLOUD", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23812
394
133