Skip to content

Commit

Permalink
fix: Use build number from env on Jenkins
Browse files Browse the repository at this point in the history
The environment variable BUILD_NUMBER contains the build number on jenkins pipeline. This utilizes that environment variable
  • Loading branch information
budde377 authored and Realtin committed Feb 28, 2018
1 parent 3af5bf9 commit d2b51fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci-services/jenkins.js
Expand Up @@ -8,7 +8,7 @@ const gitHelpers = require('../lib/git-helpers')
module.exports = {
gitUrl: env.GIT_URL,
branchName: _.drop(_.split(env.GIT_BRANCH, '/')).join('/'),
firstPush: gitHelpers.getNumberOfCommitsOnBranch(env.GIT_BRANCH) === 1,
firstPush: env.BUILD_NUMBER === '1' || gitHelpers.getNumberOfCommitsOnBranch(env.GIT_BRANCH) === 1,
correctBuild: true, // assuming pull requests are not build
uploadBuild: true // assuming 1 build per branch
}

0 comments on commit d2b51fb

Please sign in to comment.