Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var vendors = [
['TASKCLUSTER', 'TaskCluster', 'TASK_ID', 'RUN_ID'],
['GOCD', 'GoCD', 'GO_PIPELINE_LABEL'],
['BITBUCKET', 'Bitbucket Pipelines', 'BITBUCKET_COMMIT'],
['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN']
['CODEBUILD', 'AWS CodeBuild', 'CODEBUILD_BUILD_ARN'],
['TDDIUM', 'Solano CI', 'TDDIUM']
]

exports.name = null
Expand All @@ -43,6 +44,7 @@ exports.isCI = !!(
env.CI || // Travis CI, CircleCI, Gitlab CI, Appveyor, CodeShip
env.CONTINUOUS_INTEGRATION || // Travis CI
env.BUILD_NUMBER || // Jenkins, TeamCity
env.TDDIUM || // Solano CI
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to add TDDIUM to this list as it's taken care of by exports.name which will be set to Solano CI if the TDDIUM environment variable is present

exports.name ||
false
)
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ assert.equal(ci.TASKCLUSTER, false)
assert.equal(ci.GOCD, false)
assert.equal(ci.BITBUCKET, false)
assert.equal(ci.CODEBUILD, false)
assert.equal(ci.TDDIUM, false)

// Not CI
delete process.env.CI
delete process.env.CONTINUOUS_INTEGRATION
delete process.env.BUILD_NUMBER
delete process.env.TRAVIS
delete process.env.TDDIUM
clearRequire('./')
ci = require('./')

Expand All @@ -56,6 +58,7 @@ assert.equal(ci.TASKCLUSTER, false)
assert.equal(ci.GOCD, false)
assert.equal(ci.BITBUCKET, false)
assert.equal(ci.CODEBUILD, false)
assert.equal(ci.TDDIUM, false)

// Unknown CI
process.env.CI = 'true'
Expand All @@ -82,3 +85,4 @@ assert.equal(ci.TASKCLUSTER, false)
assert.equal(ci.GOCD, false)
assert.equal(ci.BITBUCKET, false)
assert.equal(ci.CODEBUILD, false)
assert.equal(ci.TDDIUM, false)