Revert "Fix extra parameter name for test-cookiecutter/reclass-system jobs"
This reverts commit e3766cce1df5dd843625c247f7f7fb716c4b42e9.
Change-Id: I9047dd2457d041d038b3e1339266d287c7768173
diff --git a/test-system-reclass-pipeline.groovy b/test-system-reclass-pipeline.groovy
index bafd0b3..47dde97 100644
--- a/test-system-reclass-pipeline.groovy
+++ b/test-system-reclass-pipeline.groovy
@@ -1,15 +1,13 @@
def gerrit = new com.mirantis.mk.Gerrit()
def common = new com.mirantis.mk.Common()
-if (env.EXTRA_VARIABLES_YAML) {
- common.mergeEnv(env, env.EXTRA_VARIABLES_YAML)
-}
def slaveNode = env.SLAVE_NODE ?: 'python&&docker'
def gerritCredentials = env.CREDENTIALS_ID ?: 'gerrit'
def gerritRef = env.GERRIT_REFSPEC ?: null
-def defaultGitUrl = "${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST}:${GERRIT_PORT}/${GERRIT_PROJECT}"
+def defaultGitRef = env.DEFAULT_GIT_REF ?: null
+def defaultGitUrl = env.DEFAULT_GIT_URL ?: null
def checkouted = false
def merged = false
@@ -30,8 +28,10 @@
])
systemRefspec = GERRIT_REFSPEC
}
- } else if (gerritRef && defaultGitUrl) {
- checkouted = gerrit.gerritPatchsetCheckout(defaultGitUrl, gerritRef, "HEAD", gerritCredentials)
+ // change defaultGit variables if job triggered from Gerrit
+ defaultGitUrl = "${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST}:${GERRIT_PORT}/${GERRIT_PROJECT}"
+ } else if (defaultGitRef && defaultGitUrl) {
+ checkouted = gerrit.gerritPatchsetCheckout(defaultGitUrl, defaultGitRef, "HEAD", gerritCredentials)
}
}