Skip to content

Commit

Permalink
Rename GIT_BRANCH variable to SOURCE_BRANCH in DSL
Browse files Browse the repository at this point in the history
- GIT_BRANCH is passed from Github for PR builds. This
  param was overiding the default value of 'master' in
  PR builds which causes PRs to fail to find the ref.

Related eclipse-openj9#2836 eclipse-openj9#4443 eclipse-openj9#4783
[skip ci]

Signed-off-by: Adam Brousseau <adam.brousseau88@gmail.com>
  • Loading branch information
AdamBrousseau authored and LinHu2016 committed May 7, 2019
1 parent 190e456 commit c272293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildenv/jenkins/jobs/pipelines/Pipeline_Template.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (!binding.hasVariable('VENDOR_BRANCH_DEFAULT')) VENDOR_BRANCH_DEFAULT = ''
if (!binding.hasVariable('VENDOR_CREDENTIALS_ID_DEFAULT')) VENDOR_CREDENTIALS_ID_DEFAULT = ''
if (!binding.hasVariable('DISCARDER_NUM_BUILDS')) DISCARDER_NUM_BUILDS = '1'
if (!binding.hasVariable('GIT_URI')) GIT_URI = 'https://github.com/eclipse/openj9.git'
if (!binding.hasVariable('GIT_BRANCH')) GIT_BRANCH = 'refs/heads/master'
if (!binding.hasVariable('SOURCE_BRANCH')) SOURCE_BRANCH = 'refs/heads/master'
if (!binding.hasVariable('GIT_REFSPEC')) GIT_REFSPEC = ''
if (!binding.hasVariable('LIGHTWEIGHT_CHECKOUT')) LIGHTWEIGHT_CHECKOUT = true

Expand All @@ -50,7 +50,7 @@ pipelineJob("$JOB_NAME") {
url(GIT_URI)
refspec(GIT_REFSPEC)
}
branch("${GIT_BRANCH}")
branch("${SOURCE_BRANCH}")
extensions {
cleanBeforeCheckout()
}
Expand Down

0 comments on commit c272293

Please sign in to comment.