Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Revert "Updates Semaphore CI Service for 2.0 (#132)"
Browse files Browse the repository at this point in the history
This reverts commit 6167aa8.
  • Loading branch information
fabiendem committed Sep 10, 2019
1 parent 8371836 commit a45a9b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
10 changes: 7 additions & 3 deletions lib/services/semaphore.js
Expand Up @@ -7,9 +7,13 @@ module.exports = {
console.log(' Semaphore CI Detected')
return {
service: 'semaphore',
branch: process.env.SEMAPHORE_GIT_BRANCH,
build: process.env.SEMAPHORE_WORKFLOW_ID,
commit: process.env.SEMAPHORE_GIT_SHA,
build:
process.env.SEMAPHORE_BUILD_NUMBER +
'.' +
process.env.SEMAPHORE_CURRENT_THREAD,
commit: process.env.REVISION,
branch: process.env.BRANCH_NAME,
slug: process.env.SEMAPHORE_REPO_SLUG,
}
},
}
15 changes: 9 additions & 6 deletions test/services/semaphore.test.js
Expand Up @@ -7,14 +7,17 @@ describe('Semaphore CI Provider', function() {
})

it('can get semaphore env info', function() {
process.env.SEMAPHORE_GIT_BRANCH = 'development'
process.env.SEMAPHORE_GIT_SHA = '5c84719708b9b649b9ef3b56af214f38cee6acde'
process.env.SEMAPHORE_WORKFLOW_ID = '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf'
process.env.SEMAPHORE_BUILD_NUMBER = '1234'
process.env.REVISION = '5678'
process.env.SEMAPHORE_CURRENT_THREAD = '1'
process.env.BRANCH_NAME = 'master'
process.env.SEMAPHORE_REPO_SLUG = 'owner/repo'
expect(semaphore.configuration()).toEqual({
service: 'semaphore',
branch: 'development',
build: '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf',
commit: '5c84719708b9b649b9ef3b56af214f38cee6acde',
commit: '5678',
build: '1234.1',
branch: 'master',
slug: 'owner/repo',
})
})
})

0 comments on commit a45a9b5

Please sign in to comment.