Waiting for statefulset to be gone

Change-Id: I482a14ebf7de178fa8718b1a127f2ae1d065938e
diff --git a/Jenkinsfile-rcordlite-zerotouch-build b/Jenkinsfile-rcordlite-zerotouch-build
index c388ad8..ed11298 100644
--- a/Jenkinsfile-rcordlite-zerotouch-build
+++ b/Jenkinsfile-rcordlite-zerotouch-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") {