Merge "When localChart is set in a VOLTHA deployment, use the local BBSim chart as well"
diff --git a/jjb/pipeline/voltha/master/software-upgrades.groovy b/jjb/pipeline/voltha/master/software-upgrades.groovy
index 2e0f73e..83ee47b 100644
--- a/jjb/pipeline/voltha/master/software-upgrades.groovy
+++ b/jjb/pipeline/voltha/master/software-upgrades.groovy
@@ -106,7 +106,7 @@
           export TARGET=voltha-comp-upgrade-test
         fi
         if [[ ${name} == 'onu-software-upgrade' ]]; then
-          export ROBOT_MISC_ARGS="-d \$ROBOT_LOGS_DIR -v onu_image_name:${onuImageName.trim()} -v onu_image_url:${onuImageUrl.trim()} -v onu_image_version:${onuImageVersion.trim()} -v onu_image_crc:${onuImageCrc.trim()} -v onu_image_local_dir:${onuImageLocalDir.trim()} -e PowerSwitch"
+          export ROBOT_MISC_ARGS="-d \$ROBOT_LOGS_DIR -v image_version:${onuImageVersion.trim()} -v image_url:${onuImageUrl.trim()} -v image_vendor:${onuImageVendor.trim()} -v image_activate_on_success:${onuImageActivateOnSuccess.trim()} -v image_commit_on_success:${onuImageCommitOnSuccess.trim()} -v image_crc:${onuImageCrc.trim()} -e PowerSwitch"
           export TARGET=onu-upgrade-test
         fi
         export VOLTCONFIG=$HOME/.volt/config-minimal
diff --git a/jjb/software-upgrades.yaml b/jjb/software-upgrades.yaml
index a7d6d30..9632554 100644
--- a/jjb/software-upgrades.yaml
+++ b/jjb/software-upgrades.yaml
@@ -29,14 +29,15 @@
           adapter-open-onu-image: 'voltha/voltha-openonu-adapter-go:1.3.1'
           rw-core-image: 'voltha/voltha-rw-core:2.9.2'
           ofagent-image: 'voltha/voltha-ofagent-go:1.6.3'
-          onu-image-name: 'software-image.img'
-          onu-image-url: 'http://bbsim0:50074/images'
-          onu-image-version: 'v1.0.0'
+          onu-image-version: 'BBSM_IMG_00002'
+          onu-image-url: 'http://bbsim0:50074/images/software-image.img'
+          onu-image-vendor: 'BBSM'
+          onu-image-activate-on-success: 'false'
+          onu-image-commit-on-success: 'false'
           onu-image-crc: '0'
-          onu-image-local-dir: '/tmp'
           time-trigger: "H H/23 * * *"
 
-      - 'software-upgrades-test':
+      - 'software-upgrades-test-legacy':
           name: 'periodic-software-upgrade-test-bbsim-2.7'
           pipeline-script: 'voltha/voltha-2.7/software-upgrades.groovy'
           build-node: 'ubuntu18.04-basebuild-8c-15g'
@@ -67,7 +68,7 @@
           time-trigger: "H H/23 * * *"
 
 - job-template:
-    id: 'software-upgrades-test'
+    id: 'software-upgrades-test-legacy'
     name: '{name}'
     sandbox: true
     volthaSystemTestsChange: ''
@@ -249,3 +250,192 @@
       - timed: |
                  TZ=America/Los_Angeles
                  {time-trigger}
+
+- job-template:
+    id: 'software-upgrades-test'
+    name: '{name}'
+    sandbox: true
+    volthaSystemTestsChange: ''
+    volthaHelmChartsChange: ''
+    kindVolthaChange: ''
+
+    description: |
+      <!-- Managed by Jenkins Job Builder -->
+      Created by {id} job-template from ci-management/jjb/software-upgrades.yaml  <br /><br />
+      E2E Validation for Voltha 2.X
+    properties:
+      - cord-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+          artifact-num-to-keep: '{artifact-num-to-keep}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    parameters:
+      - string:
+          name: buildNode
+          default: '{build-node}'
+          description: 'Name of the Jenkins node to run the job on'
+
+      - string:
+          name: extraHelmFlags
+          default: ''
+          description: 'Helm flags to pass to every helm install command'
+
+      - string:
+          name: volthaSystemTestsChange
+          default: ''
+          description: 'Download a change for gerrit in the voltha-system-tests repo, example value: "refs/changes/79/18779/13"'
+
+      - string:
+          name: volthaHelmChartsChange
+          default: ''
+          description: 'Download a change for gerrit in the voltha-helm-charts repo, example value: "refs/changes/79/18779/13"'
+
+      - string:
+          name: branch
+          default: '{code-branch}'
+          description: 'Name of the branch to use'
+
+      # deprecated params (not used in master, remove after 2.6 support is dropped)
+      - string:
+          name: kindVolthaChange
+          default: ''
+          description: 'Download a change for gerrit in the kind-voltha repo, example value: "refs/changes/32/19132/1"'
+
+      - string:
+          name: onosImg
+          default: ''
+          description: 'ONOS Image to use'
+
+      - string:
+          name: aaaVer
+          default: '{aaa-version}'
+          description: 'ONOS AAA App Version to Test Upgrade'
+
+      - string:
+          name: aaaOarUrl
+          default: '{aaa-oar-url}'
+          description: 'ONOS AAA App OAR File Url'
+
+      - string:
+          name: oltVer
+          default: '{olt-version}'
+          description: 'ONOS OLT App Version to Test Upgrade'
+
+      - string:
+          name: oltOarUrl
+          default: '{olt-oar-url}'
+          description: 'ONOS OLT App OAR File Url'
+
+      - string:
+          name: dhcpl2relayVer
+          default: '{dhcpl2relay-version}'
+          description: 'ONOS DHCP L2 Relay App Version to Test Upgrade'
+
+      - string:
+          name: dhcpl2relayOarUrl
+          default: '{dhcpl2relay-oar-url}'
+          description: 'ONOS DHCP L2 Relay App OAR File Url'
+
+      - string:
+          name: igmpproxyVer
+          default: '{igmpproxy-version}'
+          description: 'ONOS Igmp Proxy App Version to Test Upgrade'
+
+      - string:
+          name: igmpproxyOarUrl
+          default: '{igmpproxy-oar-url}'
+          description: 'ONOS Igmp Proxy App OAR File Url'
+
+      - string:
+          name: sadisVer
+          default: '{sadis-version}'
+          description: 'ONOS Sadis App Version to Test Upgrade'
+
+      - string:
+          name: sadisOarUrl
+          default: '{sadis-oar-url}'
+          description: 'ONOS Sadis App OAR File Url'
+
+      - string:
+          name: mcastVer
+          default: '{mcast-version}'
+          description: 'ONOS MCast App Version to Test Upgrade'
+
+      - string:
+          name: mcastOarUrl
+          default: '{mcast-oar-url}'
+          description: 'ONOS MCast App OAR File Url'
+
+      - string:
+          name: kafkaVer
+          default: '{kafka-version}'
+          description: 'ONOS Kafka App Version to Test Upgrade'
+
+      - string:
+          name: kafkaOarUrl
+          default: '{kafka-oar-url}'
+          description: 'ONOS Kafka App OAR File Url'
+
+      - string:
+          name: adapterOpenOltImage
+          default: '{adapter-open-olt-image}'
+          description: 'Voltha Adapter Open OLT Component Image'
+
+      - string:
+          name: adapterOpenOnuImage
+          default: '{adapter-open-onu-image}'
+          description: 'Voltha Adapter Open ONU Component Image'
+
+      - string:
+          name: rwCoreImage
+          default: '{rw-core-image}'
+          description: 'Voltha RW Core Component Image'
+
+      - string:
+          name: ofAgentImage
+          default: '{ofagent-image}'
+          description: 'Voltha Ofagent Component Image'
+
+      - string:
+          name: onuImageVersion
+          default: '{onu-image-version}'
+          description: 'Version of ONU Image to Upgrade'
+
+      - string:
+          name: onuImageUrl
+          default: '{onu-image-url}'
+          description: 'Url of ONU Image to Upgrade'
+
+      - string:
+          name: onuImageVendor
+          default: '{onu-image-vendor}'
+          description: 'Vendor of ONU Image to Upgrade'
+
+      - string:
+          name: onuImageActivateOnSuccess
+          default: '{onu-image-activate-on-success}'
+          description: 'Activate ONU Image'
+
+      - string:
+          name: onuImageCommitOnSuccess
+          default: '{onu-image-commit-on-success}'
+          description: 'Commit ONU Image'
+
+      - string:
+          name: onuImageCrc
+          default: '{onu-image-crc}'
+          description: 'CRC of ONU Image to Upgrade'
+
+    project-type: pipeline
+    concurrent: true
+
+    dsl: !include-raw-escape: pipeline/{pipeline-script}
+
+    triggers:
+      - timed: |
+                 TZ=America/Los_Angeles
+                 {time-trigger}
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index fa6591c..d719a05 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -527,7 +527,7 @@
       # ATT Per-patchset Pod builds on Tucson pod (voltha-2.7)
       - 'verify_physical_voltha_patchset_auto':
           name: 'verify_physical_voltha_patchset_auto_voltha-2.7'
-          oltDebVersionMaster: 'openolt_asfvolt16-3.4.1-dev-c5dcc7f2b27df1c42868b3a79a5416808511bb1d-40G-NNI.deb'
+          oltDebVersionMaster: 'openolt_asfvolt16-3.4.8-eec0fc9e9a01dc0d35b0b8441e0a22a4c0cc51b4-40G-NNI.deb'
           oltDebVersionVoltha23: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
           pipeline-script: 'voltha/voltha-2.7/voltha-physical-build-and-tests.groovy'
           branch-pattern: voltha-2.7
@@ -544,7 +544,7 @@
       #  ATT Manual Pod builds on Tucson pod (voltha-2.7)
       - 'verify_physical_voltha_patchset_manual':
           name: 'verify_physical_voltha_patchset_manual_voltha-2.7'
-          oltDebVersionMaster: 'openolt_asfvolt16-3.4.1-dev-c5dcc7f2b27df1c42868b3a79a5416808511bb1d-40G-NNI.deb'
+          oltDebVersionMaster: 'openolt_asfvolt16-3.4.8-eec0fc9e9a01dc0d35b0b8441e0a22a4c0cc51b4-40G-NNI.deb'
           oltDebVersionVoltha23: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
           pipeline-script: 'voltha/voltha-2.7/voltha-physical-build-and-tests.groovy'
           trigger-string: 'hardware test'
@@ -564,7 +564,7 @@
       - 'verify_physical_voltha_patchset_manual':
           name: 'verify_physical_voltha_patchset_manual_DT_voltha-2.7'
           workflow: 'dt'
-          oltDebVersionMaster: 'openolt_asfvolt16-3.4.1-dev-c5dcc7f2b27df1c42868b3a79a5416808511bb1d-40G-NNI.deb'
+          oltDebVersionMaster: 'openolt_asfvolt16-3.4.8-eec0fc9e9a01dc0d35b0b8441e0a22a4c0cc51b4-40G-NNI.deb'
           oltDebVersionVoltha23: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
           pipeline-script: 'voltha/voltha-2.7/voltha-physical-build-and-tests.groovy'
           trigger-string: 'DT hardware test'
@@ -1195,7 +1195,7 @@
     build-node: 'tucson-pod'
     config-pod: 'tucson-pod'
     profile: 'Default'
-    oltDebVersionMaster: 'openolt_asfvolt16-3.4.1-dev-c5dcc7f2b27df1c42868b3a79a5416808511bb1d-40G-NNI.deb'
+    oltDebVersionMaster: 'openolt_asfvolt16-3.4.8-eec0fc9e9a01dc0d35b0b8441e0a22a4c0cc51b4-40G-NNI.deb'
     oltDebVersionVoltha23: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
     volthaSystemTestsChange: ''
     volthaHelmChartsChange: ''
@@ -1244,7 +1244,7 @@
     sandbox: true
     build-node: 'tucson-pod'
     config-pod: 'tucson-pod'
-    oltDebVersionMaster: 'openolt_asfvolt16-3.4.1-dev-c5dcc7f2b27df1c42868b3a79a5416808511bb1d-40G-NNI.deb'
+    oltDebVersionMaster: 'openolt_asfvolt16-3.4.8-eec0fc9e9a01dc0d35b0b8441e0a22a4c0cc51b4-40G-NNI.deb'
     oltDebVersionVoltha23: 'openolt_asfvolt16-3.3.3-1a5d68b50d8bcc5ba6cb1630d3294c30c37cd2f5-40G-NNI.deb'
     pipeline-script: 'voltha/master/tucson-build-and-test.groovy'
     trigger-string: 'hardware test'