UNPKG

628 BJavaScriptView Raw
1var git = require('../git')
2
3module.exports = {
4 detect: function() {
5 return !!process.env.JENKINS_URL
6 },
7
8 configuration: function() {
9 console.log(' Jenkins CI Detected')
10 return {
11 service: 'jenkins',
12 commit:
13 process.env.ghprbActualCommit || process.env.GIT_COMMIT || git.head(),
14 branch:
15 process.env.ghprbSourceBranch ||
16 process.env.GIT_BRANCH ||
17 process.env.BRANCH_NAME,
18 build: process.env.BUILD_NUMBER,
19 build_url: process.env.BUILD_URL,
20 root: process.env.WORKSPACE,
21 pr: process.env.ghprbPullId || process.env.CHANGE_ID,
22 }
23 },
24}