Fix typo and run reclass test in a stage
Change-Id: I48f1b9dec64b97515ba3d252f99c5827aa1fa7b0
diff --git a/test-salt-models-pipeline.groovy b/test-salt-models-pipeline.groovy
index de4110d..bac97fb 100644
--- a/test-salt-models-pipeline.groovy
+++ b/test-salt-models-pipeline.groovy
@@ -10,9 +10,10 @@
gerritRef = null
}
+def systemGitRef, systemGitUrl
try {
- systemGitRef = RECLAS_SYSTEM_GIT_REF
- systemGitUrl = RECLAS_SYSTEM_GIT_URL
+ systemGitRef = RECLASS_SYSTEM_GIT_REF
+ systemGitUrl = RECLASS_SYSTEM_GIT_URL
} catch (MissingPropertyException e) {
systemGitRef = null
systemGitUrl = null
diff --git a/test-system-reclass-pipeline.groovy b/test-system-reclass-pipeline.groovy
index b7bcedc..7925819 100644
--- a/test-system-reclass-pipeline.groovy
+++ b/test-system-reclass-pipeline.groovy
@@ -1,12 +1,15 @@
def branches = [:]
+def testModels = TEST_MODELS.split(',')
-for (cluster in TEST_MODELS.split(',')) {
- branches["${cluster}"] = {
- build job: "test-salt-model-${cluster}", parameters: [
- [$class: 'StringParameterValue', name: 'RECLASS_SYSTEM_GIT_URL', value: "${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST}:${GERRIT_PORT}/${GERRIT_PROJECT}.git"],
- [$class: 'StringParameterValue', name: 'RECLASS_SYSTEM_GIT_REF', value: GERRIT_REFSPEC]
- ]
+stage("Test") {
+ for (int i = 0; i < testModels.size(); i++) {
+ def cluster = testModels[i]
+ branches["${cluster}"] = {
+ build job: "test-salt-model-${cluster}", parameters: [
+ [$class: 'StringParameterValue', name: 'RECLASS_SYSTEM_GIT_URL', value: "${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST}:${GERRIT_PORT}/${GERRIT_PROJECT}.git"],
+ [$class: 'StringParameterValue', name: 'RECLASS_SYSTEM_GIT_REF', value: GERRIT_REFSPEC]
+ ]
+ }
}
+ parallel branches
}
-
-parallel branches