Force helm tiller pod on target machine upgrade

Change-Id: I6b5c2b7da4b1af7d73b45351f766b8b80f40b727
diff --git a/Jenkinsfile-mcord-build b/Jenkinsfile-mcord-build
index ba3fb07..5a70dbf 100644
--- a/Jenkinsfile-mcord-build
+++ b/Jenkinsfile-mcord-build
@@ -69,12 +69,22 @@
             stage('Add Helm repositories') {
                 sh returnStdout: true, script: """
                 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+                helm init --upgrade --force-upgrade
                 helm repo add cord https://charts.opencord.org
                 helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
                 helm repo update
                 """
                 timeout(1) {
                     waitUntil {
+                        tillerpod_running = sh returnStdout: true, script: """
+                        export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
+                        kubectl -n kube-system get pods | grep tiller-deploy | grep Running | wc -l
+                        """
+                        return tillerpod_running.toInteger() == 1
+                    }
+                }
+                timeout(1) {
+                    waitUntil {
                         cord_repo_present = sh returnStdout: true, script: """
                         export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
                         helm repo list | grep cord | wc -l