-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added bamboo as another ci service
- Loading branch information
Showing
6 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html | ||
|
||
module.exports = { | ||
detect() { | ||
// eslint-disable-next-line camelcase | ||
return Boolean(process.env.bamboo_agentId); | ||
}, | ||
configuration() { | ||
return { | ||
service: 'bamboo', | ||
/* eslint-disable camelcase */ | ||
commit: process.env.bamboo_planRepository_1_revision, | ||
build: process.env.bamboo_buildNumber, | ||
branch: process.env.bamboo_planRepository_1_branchName, | ||
job: process.env.bamboo_buildKey, | ||
root: process.env.bamboo_build_working_directory, | ||
/* eslint-enable camelcase */ | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import test from 'ava'; | ||
import bamboo from '../lib/bamboo'; | ||
|
||
test('Push', t => { | ||
/* eslint-disable camelcase */ | ||
process.env.bamboo_planRepository_1_revision = 'some commit hash'; | ||
process.env.bamboo_buildNumber = 'some build number'; | ||
process.env.bamboo_planRepository_1_branchName = 'some branch name'; | ||
process.env.bamboo_buildKey = 'some job number'; | ||
process.env.bamboo_build_working_directory = '/some/working/dir'; | ||
/* eslint-enable camelcase */ | ||
|
||
t.deepEqual(bamboo.configuration(), { | ||
service: 'bamboo', | ||
commit: 'some commit hash', | ||
build: 'some build number', | ||
branch: 'some branch name', | ||
root: '/some/working/dir', | ||
job: 'some job number', | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters