Fix unserializable exception
Change-Id: I10245f42c19caff1100b7b439ce81bc2975ae558
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index f0cc9e8..1294e35 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -131,8 +131,10 @@
retry(30) {
out = salt.cmdRun(saltMaster, 'I@docker:swarm:role:master', """/bin/bash -c 'docker service ls | grep -E "0/[0-9]+"' && echo 'Some services are not running'""")
- for (entry in out['return']) {
- for (node in entry) {
+ for (int a = 0; a < out['return'].length(); a++) {
+ def entry = a
+ for (int i = 0; i < entry.length(); i++)
+ def node = entry[i]
if (node.value =~ /Some services are not running/) {
sleep(10)
throw new Exception("$node.key: $node.value")