Merge "Revert "Improve parallelism of testing jobs""
diff --git a/change-config.groovy b/change-config.groovy
index 44832ed..16cd629 100644
--- a/change-config.groovy
+++ b/change-config.groovy
@@ -9,6 +9,7 @@
  *   TARGET_SUBSET_TEST         Number of nodes to test config changes, empty string means all targetted nodes.
  *   TARGET_SUBSET_LIVE         Number of selected noded to live apply selected config changes.
  *   TARGET_BATCH_LIVE          Batch size for the complete live config changes on all nodes, empty string means apply to all targetted nodes.
+ *   PULL_MODEL                 Pull the latest cluster model using reclass.storage.data state
  *
 **/
 
@@ -37,6 +38,14 @@
             saltMaster = salt.connection(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
         }
 
+        if (common.validInputParam("PULL_MODEL") && PULL_MODEL.toBoolean() == true) {
+            stage('Update the reclass cluster model') {
+                def saltMasterTarget = ['expression': 'I@salt:master', 'type': 'compound']
+                result = salt.runSaltCommand(saltMaster, 'local', saltMasterTarget, 'state.apply', null, "reclass.storage.data")
+                salt.checkResult(result)
+            }
+        }
+
         stage('List target servers') {
             minions = salt.getMinions(saltMaster, TARGET_SERVERS)
             if (minions.isEmpty()) {
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 3c8846c..f432c16 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -112,6 +112,7 @@
 
                 // no underscore in STACK_NAME
                 STACK_NAME = STACK_NAME.replaceAll('_', '-')
+                outputs.put('stack_name', STACK_NAME)
 
                 // set description
                 currentBuild.description = "${STACK_NAME}"
@@ -194,6 +195,7 @@
 
                 // set description
                 currentBuild.description = STACK_NAME
+                outputs.put('stack_name', STACK_NAME)
 
                 if (STACK_REUSE.toBoolean() == false) {
                     // get templates
diff --git a/test-salt-model-node.groovy b/test-salt-model-node.groovy
index eaf0104..e22bcbe 100644
--- a/test-salt-model-node.groovy
+++ b/test-salt-model-node.groovy
@@ -56,6 +56,7 @@
       stage("test node") {
         if (checkouted) {
           def workspace = common.getWorkspace()
+          common.infoMsg("Running salt model test for node ${NODE_TARGET} in cluster ${CLUSTER_NAME}")
           saltModelTesting.setupAndTestNode(NODE_TARGET, CLUSTER_NAME, EXTRA_FORMULAS, workspace, FORMULAS_SOURCE, FORMULAS_REVISION, MAX_CPU_PER_JOB.toInteger())
         }
       }