Update passing of GERRIT_BRANCH parameter
- Use name GERRIT_PARENT_BRANCH for transmission to avoid
Gerrit Trigger reserved param name
- Enable usage in env child job (reverts a454611e04c5eff13b75dfd5a4d9e958e6ae5dec)
Related: PROD-29251
Change-Id: I90d8c739bb0aadbd3a63a7b6246f4b94efb71cb5
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")
}