watson / ci-info Goto Github PK
View Code? Open in Web Editor NEWGet details about the current Continuous Integration environment
License: MIT License
Get details about the current Continuous Integration environment
License: MIT License
The vendor detection conflicts with one of the configuration options of nestor. See cliffano/nestor#49. With the JENKINS_URL
configured for nestor, ci-info will consider my dev machine a CI server.
Not sure where we should say the fault lies, but I want to at least register this as a possible issue for some people.
Details:
Environment variables
// Add a list of actual environment variables available to the build here
// Please keep the blank line above and below the code block
// WARNING: Be careful not to include any private or otherwise sensitive information
Additional context
Concourse runs a series of steps each in its own docker container. Environment variables are
passed into each container. The ones I work with are the ones I passed unique to my job and environment. I have not yet had to deal with any global environment variables that would identify it as Concourse, although Im sure there must be some.
Details:
Environment variables
// Add a list of actual environment variables available to the build here
// Please keep the blank line above and below the code block
// WARNING: Be careful not to include any private or otherwise sensitive information
Additional context
Disclosure: I'm a product manager on Azure Pipelines.
Details:
CI=woodpecker
| environment is woodpecker
This does not appear to be a CI platform anymore.
Crunchbase reposts as closed: https://www.crunchbase.com/organization/solano-labs
Twitter inactive since 2017
Just find this plugin and would like to use it but I'm stuck with its current design.
My use case is that I need to pass in an env object instead of just process.env
here https://github.com/nfroidure/metapak/blob/master/src/metapak.js#L88
Basically what I need is a isCi(env = process.env)
function and something like a getInfo(env = process.env)
one for the above code that is heavier.
It would also have the nice side effect to be able to to lazy compute the data provided by this plugin and only compute the informations you need. One can til memoize the function if needed then to avoid multiple runs.
The tests would probably be much simpler too.
If you agree we that, let me know, I can do the PR. It would require a major version bump though.
There are several issues that have been open and idle for months. Do you need help maintaining the project?
I'd like to volunteer my services of reviewing and merging PRs among other things. I'm sure there are others in the community that would be willing to share the load as well.
Details:
Environment variables
// Add a list of actual environment variables available to the build here
// Please keep the blank line above and below the code block
// WARNING: Be careful not to include any private or otherwise sensitive information
Additional context
Appflow is a continuous integration (CI) and continuous deployment (CD) platform for Ionic development teams. Appflow helps development teams continuously build and ship their Cordova, Capacitor, and React Native apps.
Details:
Environment variables
It can already be detected as isCI
from its ci environment variables and seems pretty easy to support
Would it be possible to add a CHANGELOG
so it's easy to keep up-to-date with new releases without checking the individual commits?
Thanks for this project!
In the official docker image node:14-buster the env variable CI is set to true:
CI=true
I use this container for developing purposes (as base of a vscode devcontainer) and in order to install husky it was necessary to set the env variable CI to false:
CI=false
Unfortunately isCI returns true in this case, because env.CI has the value "false" (string) and the current used implementation converts this value to true:
// returns true
!!("false")
exports.isCI = !!(
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.RUN_ID || // TaskCluster, dsari
exports.name ||
false
)
Hello ๐, came across this lovely library and I would like to use it in a Golang project of mine. Unfortunately, I have not seen something similar in Golang. So I was wondering If it's fine with you to use it to replicate the same functionality?
Sorry for opening an issue with this question. Thanks for your time ๐
I ported this to Go, wondering if you are OK with cross linking? (i.e. add a link here to the Go version)
From:
https://layerci.com/docs/layerfile-reference/intro#build-env
https://github.com/layer-devops/docs/blob/4e0b0070b15bda6b3001dff0cc87f122009d51e0/layerfile-reference/build-env.md#build-env
Looks like the below is related env vars:
CI=true
, IS_CI_MACHINE=true
, CI_MACHINE=true
, IN_CI_MACHINE=true
, IN_CI=true
These CI
variables are always true
in LayerCI.
LAYERCI=true
LAYERCI
is always true
in LayerCI test runs.
Hi,
IT seems this library does not detect concourse ci : https://concourse-ci.org
Would be great if you could support it.
Thank you.
Can we publish a new version? We're using GitHub Actions but it does not get detected. After making sure that we got the latest version installed we figured that the vendors file of the latest published version is missing some new vendors that have been added last year.
So yeah, can we publish a new version? โค๏ธ
Details:
Hi ๐
Awesome idea for an open-source project! Would you care to broaden the scope a little bit? It would be awesome if this dependency could detect even more stuff, like which repository the current ci build is running on and which version (branch, tag, git sha) is being build.
Inspiration: https://github.com/stryker-mutator/stryker/tree/master/packages/core/src/reporters/ci
Details:
Details:
is-ci
not detecting it's a CI: https://builds.sr.ht/~royston/job/359361Environment variables
JOB_ID
, JOB_URL
image: alpine/edge
packages:
- git
- nodejs
- npm
tasks:
- setup: |
npx is-ci && echo "This is a CI server" || echo "This is not a CI server"
echo $JOB_ID
echo $JOB_URL
printenv
npx: installed 2 in 1.752s
+ echo 'This is not a CI server'
This is not a CI server
+ echo 359361
359361
+ echo https://builds.sr.ht/~royston/job/359361
https://builds.sr.ht/~royston/job/359361
+ printenv
SHELL=/bin/sh
PWD=/home/build
LOGNAME=build
JOB_URL=https://builds.sr.ht/~royston/job/359361
HOME=/home/build
SSH_CONNECTION=172.17.0.1 55330 10.0.2.15 22
TERM=xterm-256color
USER=build
SHLVL=2
SSH_CLIENT=172.17.0.1 55330 22
PATH=/bin:/usr/bin:/sbin:/usr/sbin
JOB_ID=359361
MAIL=/var/mail/build
SSH_TTY=/dev/pts/0
_=/bin/printenv
Additional context
env.JOB_URL.startsWith('https://builds.sr.ht/')
seems to be the pattern
The docs say isPR is supported for Gitlab CI which is not correct since I've run into exactly this issue.
The problem is the vendors.json file does not contain any pr
key for gitlab.
This can be easily fixed by adding it.
I'll create a PR.
Details:
Details:
Environment variables
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=fb1d0264fdb4
GITHUB_ACTION=Env
GITHUB_ACTOR=j-f1
GITHUB_EVENT_NAME=push
GITHUB_EVENT_PATH=/github/workflow/event.json
GITHUB_REPOSITORY=j-f1/eslint-docs
GITHUB_SHA=50141211ee907a2f592f03d99caf45c131fb6782
GITHUB_WORKFLOW=Run tests
GITHUB_WORKSPACE=/github/workspace
HOME=/github/home
GITHUB_REF=refs/heads/tmp
Additional context
It would be nice to add support for this before it gets out of beta.
Details:
Environment variables
CI="true"
RENDER="true"
IS_PULL_REQUEST="true" (or "false")
Additional context
Opening this issue before submitting a PR to add detection. Disclosure: I work at Render.
Hi @sibiraj-s
I've noticed that you've helped out a lot here and in is-ci. Thank you, I really appreciate your time and energy.
As you might have seen in your e-mails I've therefore added you as a maintainer to both projects - which I hope you don't mind ๐
Line 49 in ef5a612
missing ":" so therefore typescript error
Details:
Environment variables
See link above
Additional context
None
Details:
Environment variables
{ PATH: '/Users/mvarrieur/.asdf/installs/nodejs/8.10.0/bin:/Users/mvarrieur/.asdf/installs/nodejs/8.10.0/.npm/bin::/Users/mvarrieur/.asdf/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin',
TERM_PROGRAM: 'iTerm.app',
TERM: 'xterm-256color',
SHELL: '/usr/local/bin/fish',
ASDF_DIR: '/Users/mvarrieur/.asdf',
OMF_CONFIG: '/Users/mvarrieur/.config/omf',
TMPDIR: '/var/folders/8h/s585mmcs4wd749mvcdg19v380000gn/T/',
Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.2NKGHgl0UD/Render',
TERM_PROGRAM_VERSION: '3.2.9',
TERM_SESSION_ID: 'w0t0p0:C01B3F3B-99E9-4B35-8204-6B6DF61DB471',
USER: 'mvarrieur',
COMMAND_MODE: 'unix2003',
SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.gTgQAeYs7A/Listeners',
__CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0',
NPM_CONFIG_PREFIX: '/Users/mvarrieur/.asdf/installs/nodejs/8.10.0/.npm',
PWD: '/Users/mvarrieur/Projects/project',
LANG: 'en_US.UTF-8',
ITERM_PROFILE: 'Default',
XPC_FLAGS: '0x0',
XPC_SERVICE_NAME: '0',
SHLVL: '2',
HOME: '/Users/mvarrieur',
COLORFGBG: '15;0',
OMF_PATH: '/Users/mvarrieur/.local/share/omf',
ITERM_SESSION_ID: 'w0t0p0:C01B3F3B-99E9-4B35-8204-6B6DF61DB471',
LOGNAME: 'mvarrieur',
BUILD_NUMBER: '4',
SECURITYSESSIONID: '186aa',
COLORTERM: 'truecolor' }
Additional context
I'm expecting isCI to be false on my local machine, but it's returning true.
Here is the output from node:
> var ciInfo = require('ci-info');
> ciInfo
{ name: null,
isPR: null,
APPVEYOR: false,
AZURE_PIPELINES: false,
BAMBOO: false,
BITBUCKET: false,
BITRISE: false,
BUDDY: false,
BUILDKITE: false,
CIRCLE: false,
CIRRUS: false,
CODEBUILD: false,
CODESHIP: false,
DRONE: false,
DSARI: false,
GITLAB: false,
GOCD: false,
HUDSON: false,
JENKINS: false,
MAGNUM: false,
NETLIFY: false,
SAIL: false,
SEMAPHORE: false,
SHIPPABLE: false,
SOLANO: false,
STRIDER: false,
TASKCLUSTER: false,
TEAMCITY: false,
TRAVIS: false,
isCI: true }
Details:
Details:
Details:
Environment variables
Vars are listed at https://docs.platform.sh/development/variables.html#use-platformsh-provided-variables
I believe PLATFORM_OUTPUT_DIR might be the variable to check for whether to consider the environment a CI. P.sh reuses the same containers, and that is the only variable that is available in builds only (and not afterwards at runtime).
That said, PLATFORM_TREE_ID is the appropriate variable for a build ID.
Hi,
It does not work with VSTS Builds.
Anyone that has encountered the same?
Very wonder to see in npm package not supporting javascript ci server
Details:
when --ci
is used it's like EARTHLY_CI=true
env var
https://github.com/earthly/earthly/blob/86470db35c11376416c0575f6ac30ca2b0e04543/docs/earthly-command/earthly-command.md#--ci
https://github.com/earthly/earthly/blob/7189a1547f06ddb1ff676e17acfa81135548ad9f/cmd/earthly/flags.go#L170-L175
Hi,
We have a customer who uses is-ci to tweak their behavior when building, and they've noticed that we're not supported (which is not a surprise, we're a small SaaS company). I had a look at your code and it looks like you just check for env vars, is there any chance you could add a check for:
I know we have kind of a generic name, but I think this should be a pretty unique identifier.
Line 34 in e75edea
Details:
Details:
Additional context
Woodpecker is a community fork of Drone CI.
Thank you
Details:
looks like PROW_JOB_ID
env var can be used to identify Prow.
Details:
Details:
Details:
Additional context
The EAS variable (ci.EAS
) does not appear to be visible at all (not exported) as a constant.
Some companies, have a more bespoke CI setup, is there any interest in also adding the check:
require('username').sync() === 'tester'
Details:
Additional context
As AppCenter Build isn't tied to any source code management system, there won't be any support for PRs.
Appcircle is mobile CI/CD
AC_APPCIRCLE
| Set to true when Appcircle starts a build
env variables:
https://codefresh.io/docs/docs/codefresh-yaml/variables/
same page on github: https://github.com/codefresh-io/docs.codefresh.io/blob/master/_docs/codefresh-yaml/variables.md
looks like only CI=true
, there are some env vars starting with CF_
Details:
AWS CodeBuild now has an environment variable that works with GitHub and BitBucket when setup using WebHooks which can be used to detect PR builds.
CODEBUILD_WEBHOOK_EVENT
with values PULL_REQUEST_CREATED
, PULL_REQUEST_UPDATED
, and PULL_REQUEST_REOPENED
Details:
Additional context
I've noticed it today so just after upgrading to 1.5.0, it looks jest-resolve
has a problem with vendors.json
- for some reason it cannot load it properly:
โ Test suite failed to run
Cannot find module './vendors' from 'index.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
at Object.<anonymous> (node_modules/is-ci/node_modules/ci-info/index.js:3:15)
It might be more a jest-resolve
problem, but it doesn't change the fact that all my builds (jest tests) are broken now.
This commit introduces a regression: ea87a2a
Error: node_modules/ci-info/index.d.ts(50,14): error TS2451: Cannot redeclare block-scoped variable 'SEMAPHORE'.
Error: node_modules/ci-info/index.d.ts(51,14): error TS2451: Cannot redeclare block-scoped variable 'SEMAPHORE'.
Details:
Environment variables
JOB_SPEC=type:postsubmit
PULL_NUMBER=
SHLVL=1
PIPELINE_KIND=release
REPO_OWNER=projectman
HOME=/tekton/home
PULL_REFS=master
DOCKER_REGISTRY_ORG=projectman
REPO_URL=https://gitlab.com/projectman/projectman.git
HOOK_PORT_80_TCP_ADDR=10.233.41.116
APP_NAME=projectman
JX_CHART_REPOSITORY=http://bucketrepo/bucketrepo/charts/
VERSION=0.0.22
REPO_NAME=projectman
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
BUILD_ID=1608568154259
PULL_PULL_SHA=
MINK_AS=tekton-bot
PULL_PULL_REF=
JOB_TYPE=postsubmit
BUILD_NUMBER=3
DOCKERFILE_PATH=Dockerfile
PULL_BASE_REF=master
JOB_NAME=release
JX3_HOME=/home/.jx3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.