This repository was archived by the owner on Jan 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,13 @@ module.exports = {
77 console . log ( ' Semaphore CI Detected' )
88 return {
99 service : 'semaphore' ,
10- branch : process . env . SEMAPHORE_GIT_BRANCH ,
11- build : process . env . SEMAPHORE_WORKFLOW_ID ,
12- commit : process . env . SEMAPHORE_GIT_SHA ,
10+ build :
11+ process . env . SEMAPHORE_BUILD_NUMBER +
12+ '.' +
13+ process . env . SEMAPHORE_CURRENT_THREAD ,
14+ commit : process . env . REVISION ,
15+ branch : process . env . BRANCH_NAME ,
16+ slug : process . env . SEMAPHORE_REPO_SLUG ,
1317 }
1418 } ,
1519}
Original file line number Diff line number Diff line change @@ -7,14 +7,17 @@ describe('Semaphore CI Provider', function() {
77 } )
88
99 it ( 'can get semaphore env info' , function ( ) {
10- process . env . SEMAPHORE_GIT_BRANCH = 'development'
11- process . env . SEMAPHORE_GIT_SHA = '5c84719708b9b649b9ef3b56af214f38cee6acde'
12- process . env . SEMAPHORE_WORKFLOW_ID = '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf'
10+ process . env . SEMAPHORE_BUILD_NUMBER = '1234'
11+ process . env . REVISION = '5678'
12+ process . env . SEMAPHORE_CURRENT_THREAD = '1'
13+ process . env . BRANCH_NAME = 'master'
14+ process . env . SEMAPHORE_REPO_SLUG = 'owner/repo'
1315 expect ( semaphore . configuration ( ) ) . toEqual ( {
1416 service : 'semaphore' ,
15- branch : 'development' ,
16- build : '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf' ,
17- commit : '5c84719708b9b649b9ef3b56af214f38cee6acde' ,
17+ commit : '5678' ,
18+ build : '1234.1' ,
19+ branch : 'master' ,
20+ slug : 'owner/repo' ,
1821 } )
1922 } )
2023} )
You can’t perform that action at this time.
0 commit comments