Merge "Update passing of GERRIT_BRANCH parameter"
diff --git a/test-salt-formulas-env.groovy b/test-salt-formulas-env.groovy
index 9c41a94..53309c4 100644
--- a/test-salt-formulas-env.groovy
+++ b/test-salt-formulas-env.groovy
@@ -22,6 +22,11 @@
openstack_credentials_id = OPENSTACK_API_CREDENTIALS
}
+env.GERRIT_BRANCH = 'master'
+if (env.GERRIT_PARENT_BRANCH) {
+ env.GERRIT_BRANCH = GERRIT_PARENT_BRANCH
+}
+
def checkouted = false
def openstackTest = false
def travisLess = false /** TODO: Remove once formulas are witched to new config */
@@ -37,7 +42,6 @@
stage("checkout") {
if (defaultGitRef && defaultGitUrl) {
checkouted = gerrit.gerritPatchsetCheckout(defaultGitUrl, defaultGitRef, "HEAD", CREDENTIALS_ID)
-// env.GERRIT_BRANCH = GERRIT_BRANCH
} else {
throw new Exception("Cannot checkout gerrit patchset, DEFAULT_GIT_REF is null")
}
diff --git a/test-salt-formulas-pipeline.groovy b/test-salt-formulas-pipeline.groovy
index fee1e46..2bfdc7d 100644
--- a/test-salt-formulas-pipeline.groovy
+++ b/test-salt-formulas-pipeline.groovy
@@ -15,6 +15,7 @@
def defaultGitUrl = env.DEFAULT_GIT_URL ?: null
def slaveNode = env.SLAVE_NODE ?: 'virtual'
def saltVersion = env.SALT_VERSION ?: ""
+gerritBranch = env.GERRIT_BRANCH
def dockerLib = new com.mirantis.mk.Docker()
def checkouted = false
@@ -60,7 +61,7 @@
[$class: 'StringParameterValue', name: 'DEFAULT_GIT_URL', value: defaultGitUrl],
[$class: 'StringParameterValue', name: 'SALT_OPTS', value: SALT_OPTS],
[$class: 'StringParameterValue', name: 'SALT_VERSION', value: SALT_VERSION],
- [$class: 'StringParameterValue', name: 'GERRIT_BRANCH', value: GERRIT_BRANCH]
+ [$class: 'StringParameterValue', name: 'GERRIT_PARENT_BRANCH', value: gerritBranch]
]
}