Fixed change config pipeline

Change-Id: Id16439c2844524aa656da550ca6551fdd21f195d
diff --git a/change-config.groovy b/change-config.groovy
index 805e230..af1fe8b 100644
--- a/change-config.groovy
+++ b/change-config.groovy
@@ -40,6 +40,9 @@
 
         stage('List target servers') {
             minions = salt.getMinions(saltMaster, targetAll)
+            if (minions.isEmpty()) {
+                throw new Exception("No minion was targeted")
+            }
             if (TARGET_SUBSET_TEST != "") {
                 targetTestSubset = ['expression': minions.subList(0, Integer.valueOf(TARGET_SUBSET_TEST)).join(' or '), 'type': 'compound']
             }
@@ -58,7 +61,7 @@
                 'test': true
             ]
             result = salt.runSaltCommand(saltMaster, 'local', targetTestSubset, 'state.apply', null, states, kwargs)
-            salt.printSaltStateResult(result)
+            salt.checkResult(result)
         }
 
         stage('Confirm live changes on sample') {
@@ -69,7 +72,7 @@
 
         stage('Apply config changes on sample') {
             result = salt.runSaltCommand(saltMaster, 'local', targetLiveSubset, 'state.apply', null, states)
-            salt.printSaltStateResult(result)
+            salt.checkResult(result)
         }
 
         stage('Confirm live changes on all nodes') {
@@ -80,7 +83,7 @@
 
         stage('Apply config changes on all nodes') {
             result = salt.runSaltCommand(saltMaster, 'local', targetLiveAll, 'state.apply', null, states)
-            salt.printSaltStateResult(result)
+            salt.checkResult(result)
         }
 
     } catch (Throwable e) {
diff --git a/generate-cookiecutter-products-auto.groovy b/generate-cookiecutter-products-auto.groovy
index 0e4cb63..2a8f0ff 100644
--- a/generate-cookiecutter-products-auto.groovy
+++ b/generate-cookiecutter-products-auto.groovy
@@ -138,6 +138,7 @@
                 archiveArtifacts artifacts: "${clusterName}.tar.gz"
                 if(EMAIl_ADDRESS.toBoolean()){
                      //TODO: mail
+                     def TODO= "todo"
                 }
             }