Test reclass-system changes with cookiecutter
Remove useless variables at the end of cookiecutter test pipeline
Change-Id: I4225a9431c45f9be35b80d572b36b65363106ba5
diff --git a/test-cookiecutter-reclass.groovy b/test-cookiecutter-reclass.groovy
index 3a33846..c2a4d52 100644
--- a/test-cookiecutter-reclass.groovy
+++ b/test-cookiecutter-reclass.groovy
@@ -82,7 +82,15 @@
def templateContext = readYaml text: content
def clusterName = templateContext.default_context.cluster_name
def clusterDomain = templateContext.default_context.cluster_domain
- git.checkoutGitRepository("${testEnv}/classes/system", RECLASS_MODEL_URL, RECLASS_MODEL_BRANCH, CREDENTIALS_ID)
+ if (SYSTEM_GIT_URL != "") {
+ dir("${testEnv}/classes/system") {
+ gerrit.gerritPatchsetCheckout(SYSTEM_GIT_URL, SYSTEM_GIT_REF, "HEAD", CREDENTIALS_ID)
+ common.errorMsg("Failed to obtain system reclass with url: ${SYSTEM_GIT_URL} and ${SYSTEM_GIT_REF}")
+ }
+ } else {
+ git.checkoutGitRepository("${testEnv}/classes/system", RECLASS_MODEL_URL, RECLASS_MODEL_BRANCH, CREDENTIALS_ID)
+ }
+
saltModelTesting.setupAndTestNode("cfg01.${clusterDomain}", clusterName, EXTRA_FORMULAS, testEnv)
}
@@ -171,8 +179,5 @@
currentBuild.result = "FAILURE"
currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
throw e
- } finally {
- def dummy = "dummy"
- //FAILING common.sendNotification(currentBuild.result,"",["slack"])
}
}