Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Detect solano-ci #9

Merged
merged 3 commits into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Officially supported CI servers:
- [Jenkins CI](https://jenkins-ci.org)
- [Magnum CI](https://magnum-ci.com)
- [Semaphore](https://semaphoreci.com)
- [Solano CI](https://www.solanolabs.com/)
- [TaskCluster](http://docs.taskcluster.net)
- [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx) by Microsoft
- [TeamCity](https://www.jetbrains.com/teamcity/) by JetBrains
Expand Down Expand Up @@ -90,6 +91,7 @@ Otherwise `false`.
- `ci.JENKINS`
- `ci.MAGNUM`
- `ci.SEMAPHORE`
- `ci.TDDIUM` (Solano CI)
- `ci.TASKCLUSTER`
- `ci.TEAMCITY`
- `ci.TFS` (Team Foundation Server)
Expand Down
3 changes: 2 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 Down
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)