Waiting for statefulset to be gone
Change-Id: I482a14ebf7de178fa8718b1a127f2ae1d065938e
diff --git a/Jenkinsfile-rcordlite-topdown-build b/Jenkinsfile-rcordlite-topdown-build
index f811502..cfe7253 100644
--- a/Jenkinsfile-rcordlite-topdown-build
+++ b/Jenkinsfile-rcordlite-topdown-build
@@ -50,6 +50,15 @@
return kubectl_deleted.toInteger() == 0
}
}
+ timeout(5) {
+ waitUntil {
+ kubectl_deleted = sh returnStdout: true, script: """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+ kubectl get statefulset --all-namespaces --no-headers | grep -E -v 'kube-system|docker-registry|mavenrepo|ponnet' | wc -l
+ """
+ return kubectl_deleted.toInteger() == 0
+ }
+ }
}
}
dir ("helm-charts") {