fixes to xos-service-upgrade tests

Change-Id: Idf78d64296f0873a80c816907920efd4574b8550
diff --git a/jjb/pipeline/xos-service-upgrade.groovy b/jjb/pipeline/xos-service-upgrade.groovy
index a362efc..d0933f6 100644
--- a/jjb/pipeline/xos-service-upgrade.groovy
+++ b/jjb/pipeline/xos-service-upgrade.groovy
@@ -92,6 +92,17 @@
 
     stage('Install XOS w/Service') {
       steps {
+          script {
+          if (serviceName == "olt-service") {
+            serviceName = "volt"
+          }
+          else if (serviceName == "onos-service") {
+            serviceName = "onos"
+          }
+          else if (serviceName == "kubernetes-service") {
+            serviceName = "kubernetes"
+          }
+        }
         sh """
            #!/usr/bin/env bash
            set -eu -o pipefail
@@ -104,25 +115,14 @@
            helm-repo-tools/wait_for_pods.sh
 
            #install service
-           helm dep update xos-services/${gerritProject}
-           helm install xos-services/${gerritProject} -n ${gerritProject}
+           helm dep update xos-services/${serviceName}
+           helm install xos-services/${serviceName} -n ${serviceName}
            popd
            """
       }
     }
     stage('Verify') {
       steps {
-        script {
-          if (serviceName == "olt-service") {
-            serviceName = "volt"
-          }
-          else if (serviceName == "onos-service") {
-            serviceName = "onos"
-          }
-          else if (serviceName == "kubernetes-service") {
-            serviceName = "kubernetes"
-          }
-        }
         echo "serviceName: ${serviceName}"
         sh """
            #!/usr/bin/env bash
@@ -201,7 +201,6 @@
            export DOCKER_TAG=\$(cat VERSION)-test
            export DOCKER_REPOSITORY=xosproject/
            export DOCKER_BUILD_ARGS=--no-cache
-           cd $WORKSPACE/cord/orchestration/xos-services/${gerritProject}
            echo "\$(cat VERSION)-test" > VERSION
            make docker-build
 
@@ -209,7 +208,7 @@
            cd $WORKSPACE/cord/helm-charts
            helm upgrade --set image.tag=\$DOCKER_TAG \
                         --set image.pullPolicy=Never \
-                         --recreate-pods ${gerritProject} xos-services/${gerritProject}
+                         --recreate-pods ${serviceName} xos-services/${serviceName}
            popd
            """
       }