Skip to content

Commit

Permalink
feat: detect solano-ci (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s authored and watson committed Aug 14, 2018
1 parent 4e472d0 commit e239e48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
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)

0 comments on commit e239e48

Please sign in to comment.