Fix variable
Change-Id: I1fade8c3fa948ffc47682d7dbb20e3f9d4a41ae6
diff --git a/cicd-lab-pipeline.groovy b/cicd-lab-pipeline.groovy
index 94556a4..83c7b59 100644
--- a/cicd-lab-pipeline.groovy
+++ b/cicd-lab-pipeline.groovy
@@ -132,7 +132,7 @@
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 (int a = 0; a < out['return'].size(); a++) {
- def entry = a
+ def entry = out['return'][a]
for (int i = 0; i < entry.size(); i++) {
def node = entry[i]
if (node.value =~ /Some services are not running/) {