Skip to content

Commit

Permalink
Add details about Semaphore CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolalsvk committed May 25, 2018
1 parent 2e68ab8 commit 0937ce3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
16 changes: 10 additions & 6 deletions packages/server/lib/util/ci_provider.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ providers = {
}

buildNums = (provider) -> {
appveyor: process.env.APPVEYOR_BUILD_NUMBER
circle: process.env.CIRCLE_BUILD_NUM
codeship: process.env.CI_BUILD_NUMBER
gitlab: process.env.CI_BUILD_ID
jenkins: process.env.BUILD_NUMBER
travis: process.env.TRAVIS_BUILD_NUMBER
appveyor: process.env.APPVEYOR_BUILD_NUMBER
circle: process.env.CIRCLE_BUILD_NUM
codeship: process.env.CI_BUILD_NUMBER
gitlab: process.env.CI_BUILD_ID
jenkins: process.env.BUILD_NUMBER
travis: process.env.TRAVIS_BUILD_NUMBER
semaphore: process.env.SEMAPHORE_BUILD_NUMBER
}[provider]

groupIds = (provider) -> {
Expand Down Expand Up @@ -65,6 +66,9 @@ params = (provider) -> {
buildId: process.env.TRAVIS_BUILD_ID
repoSlug: process.env.TRAVIS_REPO_SLUG
}
semaphore: {
repoSlug: process.env.SEMAPHORE_REPO_SLUG
}
}[provider]

# details = {
Expand Down
8 changes: 6 additions & 2 deletions packages/server/test/unit/ci_provider_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,15 @@ describe "lib/util/ci_provider", ->

it "semaphore", ->
process.env.SEMAPHORE = true
process.env.SEMAPHORE_BUILD_NUMBER = "46"
process.env.SEMAPHORE_REPO_SLUG = "rails/rails"

@expects({
name: "semaphore"
buildNum: null
params: null
buildNum: "46"
params: {
repoSlug: "rails/rails"
}
})

it "shippable", ->
Expand Down

0 comments on commit 0937ce3

Please sign in to comment.