updating bbsim-validation job

Change-Id: Ib98d2f26c1163054c65a78809f15cdf3a8b4ac31
diff --git a/jjb/bbsim-validation.yaml b/jjb/bbsim-validation.yaml
index 7fd5c19..ef271df 100644
--- a/jjb/bbsim-validation.yaml
+++ b/jjb/bbsim-validation.yaml
@@ -31,7 +31,7 @@
     parameters:
       - string:
          name: executorNode
-         default: 'ubuntu16.04-basebuild-4c-8g'
+         default: 'qct-pod2-node1'
          description: 'Name of the Jenkins node to run the job on'
 
       - string:
@@ -54,6 +54,11 @@
          default: '16'
          description: 'Number of ONUs per pon port'
 
+      - string:
+         name: EmulationMode
+         default: '--set emulation_mode=default'
+         description: 'Emulation for BBSIM (both|aaa|default'
+
     project-type: pipeline
     concurrent: false
 
diff --git a/jjb/pipeline/bbsim-validation.groovy b/jjb/pipeline/bbsim-validation.groovy
index 6da8132..e326407 100644
--- a/jjb/pipeline/bbsim-validation.groovy
+++ b/jjb/pipeline/bbsim-validation.groovy
@@ -42,40 +42,18 @@
       }
     }
 
-    stage('minikube') {
+    stage('Clean up') {
       steps {
-        /* see https://github.com/kubernetes/minikube/#linux-continuous-integration-without-vm-support */
-        sh '''
-           export MINIKUBE_WANTUPDATENOTIFICATION=false
-           export MINIKUBE_WANTREPORTERRORPROMPT=false
-           export CHANGE_MINIKUBE_NONE_USER=true
-           export MINIKUBE_HOME=$HOME
-           mkdir -p $HOME/.kube || true
-           touch $HOME/.kube/config
-           export KUBECONFIG=$HOME/.kube/config
-           sudo -E /usr/bin/minikube start --vm-driver=none
-           '''
-        script {
-          timeout(3) {
-            waitUntil {
-              sleep 5
-              def kc_ret = sh script: "kubectl get po", returnStatus: true
-              return (kc_ret == 0);
-            }
-          }
-        }
-      }
-    }
-
-    stage('helm') {
-      steps {
-        sh '''
-           helm init
-           sleep 60
-           helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
-           helm repo add cord https://charts.opencord.org
-           helm repo update
-           '''
+            sh """
+            rm -rf voltha-bbsim/
+            rm -rf pod-configs/
+            rm -rf cord/helm-charts/helm-repo-tools/
+            for hchart in \$(helm list -q | grep -E -v 'docker-registry|mavenrepo|ponnet');
+            do
+                echo "Purging chart: \${hchart}"
+                helm delete --purge "\${hchart}"
+            done
+            """
       }
     }
 
@@ -84,7 +62,6 @@
         sh '''
            git clone https://github.com/opencord/voltha-bbsim
            cd voltha-bbsim/
-           make docker
            docker images | grep bbsim
            '''
       }
@@ -105,7 +82,7 @@
            helm-repo-tools/wait_for_pods.sh
 
            helm upgrade --install etcd-operator --version 0.8.3 stable/etcd-operator
-           sleep 120
+           sleep 60
            JOBS_TIMEOUT=900 ./helm-repo-tools/wait_for_jobs.sh
 
            helm dep up voltha
@@ -136,7 +113,7 @@
            kubectl get pods
            helm list
 
-           helm install --set images.bbsim.tag=latest --set images.bbsim.pullPolicy=IfNotPresent --set onus_per_pon_port=${params.OnuCount} bbsim -n bbsim
+           helm install --set images.bbsim.tag=latest --set images.bbsim.pullPolicy=IfNotPresent --set onus_per_pon_port=${params.OnuCount} ${params.EmulationMode} bbsim -n bbsim
            for hchart in \$(helm list -q);
            do
              echo "## 'helm status' for chart: \${hchart} ##"
@@ -162,8 +139,8 @@
         sh """
            #!/usr/bin/env bash
            set -eu -o pipefail
-           pushd cord/test/cord-tester/src/test/cord-api/Tests/BBSim/
-           robot -e notready -v number_of_onus:${params.OnuCount} BBSIMScale.robot || true
+           pushd cord/test/cord-tester/src/test/cord-api/Tests/BBSim
+           robot -e serviceinstances -e onosdhcp -e notready -v number_of_onus:${params.OnuCount} BBSIMScale.robot || true
            """
       }
     }
@@ -200,14 +177,6 @@
          echo "# removing helm deployments"
          kubectl get pods
          helm list
-
-         for hchart in \$(helm list -q);
-         do
-           echo "## Purging chart: \${hchart} ##"
-           helm delete --purge "\${hchart}"
-         done
-
-         sudo minikube delete
          '''
          step([$class: 'RobotPublisher',
             disableArchiveOutput: false,