Updated dmi-build-and-test pipeline with option to choose Voltha Infra and Stack deployments

Change-Id: Iec45b090782eb53bf990f5807d21a46374dddd12
diff --git a/jjb/pipeline/voltha/master/dmi-build-and-test.groovy b/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
index 3138e81..afa034f 100755
--- a/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
+++ b/jjb/pipeline/voltha/master/dmi-build-and-test.groovy
@@ -93,11 +93,6 @@
       }
     }
     stage('Install Voltha')  {
-      when {
-        expression {
-          return installVoltha.toBoolean()
-        }
-      }
       steps {
         timeout(20) {
           installVoltctl("${branch}")
@@ -156,14 +151,18 @@
               etcdReplica: params.NumOfEtcd,
               bbsimReplica: bbsimReplicas.toInteger(),
               adaptersToWait: numberOfAdaptersToWait,
+              withVolthaInfra: installVolthaInfra.toBoolean(),
+              withVolthaStack: installVolthaStack.toBoolean(),
               ])
 
-            if(openoltAdapterChart != "onf/voltha-adapter-openolt"){
-              extraHelmFlags = extraHelmFlags + " --set global.log_level=${logLevel}"
-              deploy_custom_chart(volthaNamespace, oltAdapterReleaseName, openoltAdapterChart, extraHelmFlags)
-              waitForAdapters([
-                adaptersToWait: 2
-              ])
+            if(installVolthaStack.toBoolean()) {
+              if(openoltAdapterChart != "onf/voltha-adapter-openolt"){
+                extraHelmFlags = extraHelmFlags + " --set global.log_level=${logLevel}"
+                deploy_custom_chart(volthaNamespace, oltAdapterReleaseName, openoltAdapterChart, extraHelmFlags)
+                waitForAdapters([
+                  adaptersToWait: 2
+                ])
+              }
             }
           }
           sh """
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 626e393..30a2194 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -709,7 +709,8 @@
     <<: *voltha-pipe-job-boiler-plate
     # default values
     pipeline-script: 'voltha/master/dmi-build-and-test.groovy'
-    installVoltha: true
+    installVolthaInfra: true
+    installVolthaStack: true
     VolthaEtcdPort: 2379
     num-of-openonu: 1
     num-of-onos: 3
@@ -802,9 +803,14 @@
           description: 'Installs and uses the specified work flow on the POD'
 
       - bool:
-          name: installVoltha
-          default: '{installVoltha}'
-          description: "Whether to install VOLTHA"
+          name: installVolthaInfra
+          default: '{installVolthaInfra}'
+          description: "Whether to install VOLTHA Infra"
+
+      - bool:
+          name: installVolthaStack
+          default: '{installVolthaStack}'
+          description: "Whether to install VOLTHA Stack"
 
       - string:
           name: extraHelmFlags
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index c091a4e..0d1d267 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -589,7 +589,8 @@
           release: 'master'
           branch: 'master'
           profile: 'Default'
-          installVoltha: false
+          installVolthaInfra: true
+          installVolthaStack: false
           reinstall-olt: false
           restart-olt: false
           extraHelmFlags: " -f /home/community/SDX_Device_Manager_21.4/helm/values-onf.yaml "