Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Get details about the current Continuous Integration environment

License

NotificationsYou must be signed in to change notification settings

watson/ci-info

Repository files navigation

Get details about the current Continuous Integration environment.

Pleaseopen anissueif your CI server isn't properly detected :)

npmTestsjs-standard-style

Installation

npm install ci-info --save

Usage

varci=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:

NameConstantisPR
Agola CIci.AGOLA
Appcircleci.APPCIRCLE
AppVeyorci.APPVEYOR
AWS CodeBuildci.CODEBUILD
Azure Pipelinesci.AZURE_PIPELINES
Bamboo by Atlassianci.BAMBOO🚫
Bitbucket Pipelinesci.BITBUCKET
Bitriseci.BITRISE
Buddyci.BUDDY
Buildkiteci.BUILDKITE
CircleCIci.CIRCLE
Cirrus CIci.CIRRUS
Cloudflare Pagesci.CLOUDFLARE_PAGES🚫
Codefreshci.CODEFRESH
Codeshipci.CODESHIP🚫
Droneci.DRONE
dsarici.DSARI🚫
Earthly CIci.EARTHLY🚫
Expo Application Servicesci.EAS🚫
Gerrit CIci.GERRIT🚫
GitHub Actionsci.GITHUB_ACTIONS
GitLab CIci.GITLAB
Gitea Actionsci.GITEA_ACTIONS🚫
GoCDci.GOCD🚫
Google Cloud Buildci.GOOGLE_CLOUD_BUILD🚫
Harness CIci.HARNESS🚫
Herokuci.HEROKU🚫
Hudsonci.HUDSON🚫
Jenkins CIci.JENKINS
LayerCIci.LAYERCI
Magnum CIci.MAGNUM🚫
Netlify CIci.NETLIFY
Nevercodeci.NEVERCODE
Prowci.PROW🚫
ReleaseHubci.RELEASEHUB🚫
Renderci.RENDER
Sail CIci.SAIL
Screwdriverci.SCREWDRIVER
Semaphoreci.SEMAPHORE
Sourcehutci.SOURCEHUT🚫
Strider CDci.STRIDER🚫
TaskClusterci.TASKCLUSTER🚫
TeamCity by JetBrainsci.TEAMCITY🚫
Travis CIci.TRAVIS
Velaci.VELA
Vercelci.VERCEL
Visual Studio App Centerci.APPCENTER🚫
Woodpeckerci.WOODPECKER

API

ci.name

Returns a string containing name of the CI server the code is running on.If CI server is not detected, it returnsnull.

Don't depend on the value of this string not to change for a specificvendor. If you find your self writingci.name === 'Travis CI', youmost likely want to useci.TRAVIS instead.

ci.isCI

Returns a boolean. Will betrue if the code is running on a CI server,otherwisefalse.

Some CI servers not listed here might still trigger theci.isCIboolean to be set totrue if they use certain vendor neutralenvironment variables. In those casesci.name will benull and novendor specific boolean will be set totrue.

ci.isPR

Returns a boolean if PR detection is supported for the current CI server. Willbetrue if a PR is being tested, otherwisefalse. If PR detection isnot supported for the current CI server, the value will benull.

ci.<VENDOR-CONSTANT>

A vendor specific boolean constant is exposed for each support CIvendor. A constant will betrue if the code is determined to run onthe given CI server, otherwisefalse.

Examples of vendor constants areci.TRAVIS orci.APPVEYOR. For acomplete list, see the support table above.

Ports

ci-info has been ported to the following languages

LanguageRepository
Gohttps://github.com/hofstadter-io/cinful
Rusthttps://github.com/sagiegurari/ci_info
Kotlinhttps://github.com/cloudflightio/ci-info

License

MIT

About

Get details about the current Continuous Integration environment

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp