Merge "Updating Apps version in Master"
diff --git a/jjb/pipeline/voltha/master/physical-build.groovy b/jjb/pipeline/voltha/master/physical-build.groovy
old mode 100644
new mode 100755
index 51313a6..213f5a6
--- a/jjb/pipeline/voltha/master/physical-build.groovy
+++ b/jjb/pipeline/voltha/master/physical-build.groovy
@@ -182,20 +182,16 @@
                 export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
                 etcd_container=\$(kubectl get pods -n ${infraNamespace} -l app.kubernetes.io/name=etcd --no-headers | awk 'NR==1{print \$1}')
                 if [[ "${workFlow}" == "TT" ]]; then
+                   kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-HSIA.json \$etcd_container:/tmp/hsia.json
+                   kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/hsia.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64'
+                   kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-VoIP.json \$etcd_container:/tmp/voip.json
+                   kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/voip.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/65'
                    if [[ "${params.enableMultiUni}" == "true" ]]; then
-                      kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-multi-uni-HSIA.json \$etcd_container:/tmp/hsia.json
-                      kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/hsia.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64'
-                      kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-multi-uni-VoIP.json \$etcd_container:/tmp/voip.json
-                      kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/voip.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/65'
                       kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-multi-uni-MCAST-AdditionalBW-None.json \$etcd_container:/tmp/mcast_additionalBW_none.json
                       kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/mcast_additionalBW_none.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/66'
                       kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-multi-uni-MCAST-AdditionalBW-NA.json \$etcd_container:/tmp/mcast_additionalBW_na.json
                       kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/mcast_additionalBW_na.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/67'
                    else
-                      kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-HSIA.json \$etcd_container:/tmp/hsia.json
-                      kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/hsia.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/64'
-                      kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-VoIP.json \$etcd_container:/tmp/voip.json
-                      kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/voip.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/65'
                       kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-MCAST-AdditionalBW-None.json \$etcd_container:/tmp/mcast_additionalBW_none.json
                       kubectl exec -n ${infraNamespace} -it \$etcd_container -- /bin/sh -c 'cat /tmp/mcast_additionalBW_none.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/${tech_prof_directory}/66'
                       kubectl cp -n ${infraNamespace} $WORKSPACE/voltha-system-tests/tests/data/TechProfile-TT-MCAST-AdditionalBW-NA.json \$etcd_container:/tmp/mcast_additionalBW_na.json
diff --git a/jjb/pipeline/voltha/master/software-upgrades.groovy b/jjb/pipeline/voltha/master/software-upgrades.groovy
index 387cbda..f6a9894 100755
--- a/jjb/pipeline/voltha/master/software-upgrades.groovy
+++ b/jjb/pipeline/voltha/master/software-upgrades.groovy
@@ -33,7 +33,7 @@
       _TAG=kail-${name} kail -n ${infraNamespace} -n ${volthaNamespace} > ${logsDir}/onos-voltha-startup-combined.log &
       """
       def extraHelmFlags = extraHelmFlags.trim()
-      if ("${name}" == "onos-app-upgrade" || "${name}" == "onu-software-upgrade" || "${name}" == "voltha-component-upgrade") {
+      if ("${name}" == "onos-app-upgrade" || "${name}" == "onu-software-upgrade" || "${name}" == "voltha-component-upgrade" || "${name}" == "voltha-component-rolling-upgrade") {
           extraHelmFlags = " --set global.log_level=${logLevel.toUpperCase()},onu=1,pon=1 --set onos-classic.replicas=3,onos-classic.atomix.replicas=3 " + extraHelmFlags
       }
       if ("${name}" == "onu-image-dwl-simultaneously") {
@@ -42,7 +42,7 @@
       if ("${name}" == "onos-app-upgrade" || "${name}" == "onu-software-upgrade" || "${name}" == "onu-image-dwl-simultaneously") {
           extraHelmFlags = " --set global.image_tag=master --set onos-classic.image.tag=master " + extraHelmFlags
       }
-      if ("${name}" == "voltha-component-upgrade") {
+      if ("${name}" == "voltha-component-upgrade" || "${name}" == "voltha-component-rolling-upgrade") {
           extraHelmFlags = " --set images.onos_config_loader.tag=master-onos-config-loader --set onos-classic.image.tag=master " + extraHelmFlags
       }
       extraHelmFlags = extraHelmFlags + " --set onos-classic.onosSshPort=30115 --set onos-classic.onosApiPort=30120 "
@@ -117,7 +117,7 @@
           export ROBOT_MISC_ARGS="-d \$ROBOT_LOGS_DIR -v onos_apps_under_test:\$ONOS_APPS_UNDER_TEST -e PowerSwitch"
           export TARGET=onos-app-upgrade-test
         fi
-        if [[ ${name} == 'voltha-component-upgrade' ]]; then
+        if [ ${name} == 'voltha-component-upgrade' ] || [ ${name} == 'voltha-component-rolling-upgrade' ]; then
           export VOLTHA_COMPS_UNDER_TEST+=''
           if [ ${adapterOpenOltImage.trim()} != '' ]; then
             VOLTHA_COMPS_UNDER_TEST+="adapter-open-olt,adapter-open-olt,${adapterOpenOltImage.trim()}*"
@@ -132,8 +132,13 @@
             VOLTHA_COMPS_UNDER_TEST+="ofagent,ofagent,${ofAgentImage.trim()}*"
           fi
           export ROBOT_MISC_ARGS="-d \$ROBOT_LOGS_DIR -v voltha_comps_under_test:\$VOLTHA_COMPS_UNDER_TEST -e PowerSwitch"
+        fi
+        if [[ ${name} == 'voltha-component-upgrade' ]]; then
           export TARGET=voltha-comp-upgrade-test
         fi
+        if [[ ${name} == 'voltha-component-rolling-upgrade' ]]; then
+          export TARGET=voltha-comp-rolling-upgrade-test
+        fi
         if [[ ${name} == 'onu-software-upgrade' ]]; then
           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
@@ -228,6 +233,7 @@
       steps {
         test_software_upgrade("onos-app-upgrade")
         test_software_upgrade("voltha-component-upgrade")
+        test_software_upgrade("voltha-component-rolling-upgrade")
         test_software_upgrade("onu-software-upgrade")
         test_software_upgrade("onu-image-dwl-simultaneously")
       }
diff --git a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
index ef09ef0..1e17241 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-multi-stack.groovy
@@ -295,6 +295,7 @@
           sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 volt-olts > $LOG_FOLDER/onos-olt-list.txt || true
           sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 flows -s > $LOG_FOLDER/onos-flows-list.txt || true
           sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@127.0.0.1 meters > $LOG_FOLDER/onos-meters-list.txt || true
+          sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 volt-port-status > $LOG_FOLDER/onos-volt-port-status.txt || true
         fi
 
         if [ ${provisionSubscribers} = true ]; then
diff --git a/jjb/pipeline/voltha/master/voltha-scale-test.groovy b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
index ab9514b..ac9af2e 100644
--- a/jjb/pipeline/voltha/master/voltha-scale-test.groovy
+++ b/jjb/pipeline/voltha/master/voltha-scale-test.groovy
@@ -754,6 +754,7 @@
           sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 volt-olts > $LOG_FOLDER/onos-olt-list.txt
           sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 flows -s > $LOG_FOLDER/onos-flows-list.txt
           sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 meters > $LOG_FOLDER/onos-meters-list.txt
+          sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@127.0.0.1 volt-port-status > $LOG_FOLDER/onos-volt-port-status.txt
         fi
 
         if [ ${provisionSubscribers} = true ]; then
diff --git a/jjb/verify/up4.yaml b/jjb/verify/up4.yaml
index 087b66b..5baf8e3 100644
--- a/jjb/verify/up4.yaml
+++ b/jjb/verify/up4.yaml
@@ -20,6 +20,7 @@
     jobs:
       - "up4-pr-verify"
       - "up4-postmerge"
+      - "up4-devel-nightly"
 
 - job-template:
     id: "up4-pr-verify"
@@ -132,3 +133,60 @@
           - text:
               credential-id: codecov-up4
               variable: CODECOV_TOKEN
+
+- job-template:
+    id: "up4-devel-nightly"
+    name: "up4-devel-nightly"
+    description: |
+      Created by {id} job-template from ci-management/up4.yaml<br/>
+
+    project-type: pipeline
+    concurrent: true
+
+    properties:
+      # Visibility restricted to Aether members only.
+      - cord-infra-aether-private:
+      - cord-infra-properties:
+          build-days-to-keep: "15"
+          artifact-num-to-keep: "-1"
+      - github:
+          url: "https://github.com/{github-organization}/{project}"
+
+    parameters:
+      - string:
+          name: buildNode
+          default: "{build-node}"
+          description: "Name of the Jenkins executor node to run the job on."
+      - string:
+          name: commitHash
+          default: 'origin/{stream}'
+          description: 'SHA string of the merged commit to build. Populated by Generic Webhook Trigger.'
+      - string:
+          name: up4Env
+          default: 'devel'
+          description: 'UP4 STC scenarios environment (stable or devel)'
+
+    pipeline-scm:
+      script-path: ".jenkins/Jenkinsfile"
+      scm:
+        - git:
+            url: "git@github.com:{github-organization}/{project}.git"
+            credentials-id: "github-onf-bot-ssh-key"
+            refspec: "+refs/heads/*:refs/remotes/origin/*"
+            branches:
+              - "$commitHash"
+            submodule:
+              disable: true
+            shallow-clone: true
+
+    triggers:
+      - timed: "@midnight"
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: "{build-timeout}"
+          jenkins-ssh-credential: "{jenkins-ssh-credential}"
+      - credentials-binding:
+          - text:
+              credential-id: codecov-up4
+              variable: CODECOV_TOKEN
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index c5d2a85..2945f69 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -118,8 +118,26 @@
           withEapol: false
           withDhcp: false
           withIgmp: false
+          onosImg: matteoscandolo/voltha-onos:oltapp
           extraHelmFlags: '-f /home/jenkins/voltha-scale/voltha-values.yaml --set uni=1 --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn'
 
+      - 'voltha-scale-measurements':
+            name: 'voltha-scale-measurements-master-1-64-63-dt-subscribers'
+            'disable-job': false
+            build-node: 'voltha-scale-1'
+            time-trigger: "H H/4 * * *"
+            olts: 1
+            pons: 64
+            onus: 63
+            withFlows: true
+            provisionSubscribers: true
+            workflow: dt
+            withEapol: false
+            withDhcp: false
+            withIgmp: false
+            onosImg: matteoscandolo/voltha-onos:oltapp
+            extraHelmFlags: '-f /home/jenkins/voltha-scale/voltha-values.yaml --set uni=1 --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn -f /home/cord/dt-custom-values.yaml'
+
       # multi-stack jobs
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-10-stacks-2-16-32-att-subscribers'
@@ -142,7 +160,7 @@
           withEapol: true
           withDhcp: true
           withIgmp: false
-          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn"
+          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml"
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-10-stacks-2-16-32-dt-subscribers'
@@ -165,7 +183,7 @@
           withEapol: false
           withDhcp: false
           withIgmp: false
-          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn"
+          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml"
 
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-master-10-stacks-2-16-32-tt-subscribers'
@@ -188,7 +206,7 @@
           withEapol: false
           withDhcp: true
           withIgmp: true
-          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml --set etcd.persistence.enabled=true,etcd.persistence.storageClass=longhorn"
+          extraHelmFlags: "-f /home/jenkins/voltha-scale/voltha-values.yaml"
 
       # voltha-2.8 Jobs
       - 'voltha-scale-measurements':
diff --git a/jjb/voltha-test/voltha-certification.yaml b/jjb/voltha-test/voltha-certification.yaml
index da06bfa..d809e8b 100644
--- a/jjb/voltha-test/voltha-certification.yaml
+++ b/jjb/voltha-test/voltha-certification.yaml
@@ -86,12 +86,11 @@
       - 'build_voltha_pod_release_timer':
           build-node: 'menlo-certification-pod-3'
           config-pod: 'menlo-certification-pod-radisys-3200g'
-          disable-job: true
           reinstall-olt: true
           name-extension: '_DT'
           work-flow: 'DT'
           profile: '1T8GEM'
-          time: '5'
+          time: '1'
           extraHelmFlags: "--set onos-classic.image.tag=master --set voltha.global.rw_core.rpc_timeout=30s --set voltha.global.rw_core.internal_timeout=30s"
 
       # Certification (Radisys) POD test job - master versions: uses 1T8GEM tech profile on voltha branch
@@ -99,7 +98,6 @@
           timeout: 330
           build-node: 'menlo-certification-pod-3'
           config-pod: 'menlo-certification-pod-radisys-3200g'
-          disable-job: true
           release: 'master'
           branch: 'master'
           name-extension: '_DT'