Merge "[VOL-2709] fix triggers for the test jobs"
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index 192e4df..2526400 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -319,29 +319,29 @@
           profile: 'Default'
 
 
-      # Berlin pod with olt/onu - Released versions Default tech profile and timer based job
+      # Berlin pod with olt/onu - master versions Default tech profile and timer based job
       - 'build_voltha_pod_release':
           build-node: 'dt-berlin-community-pod'
           config-pod: 'dt-berlin-pod'
-          release: 'release'
+          release: 'master'
           branch: 'master'
           onos-version: '2.2'
           test-repo: 'voltha-system-tests'
           Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
           oltDebVersion: 'openolt_asfvolt16_bal3.2.deb'
           configurePod: true
-          released: true
+          released: false
           profile: 'Default'
           with-kind: true
           time: '9'
 
 
-      # Berlin POD test job - released versions: uses tech profile on voltha branch
+      # Berlin POD test job - master versions: uses tech profile on voltha branch
       - 'build_voltha_pod_test':
           build-node: 'dt-berlin-community-pod'
           config-pod: 'dt-berlin-pod'
-          release: 'release'
+          release: 'master'
           branch: 'master'
-          released: true
+          released: false
           test-repo: 'voltha-system-tests'
           profile: 'Default'
diff --git a/jjb/omec-ci.yaml b/jjb/omec-ci.yaml
index 585b12e..8dd729d 100644
--- a/jjb/omec-ci.yaml
+++ b/jjb/omec-ci.yaml
@@ -106,6 +106,27 @@
           build-timeout: 30
           docker-repo: 'omecproject'
 
+# for nucleus
+- project:
+    name: Nucleus
+    project: '{name}'
+
+    build-node: 'intel-102'
+
+    github-organization: 'omec-project'
+
+    github_pr_auth_id: '64fe2b1a-b33a-4f13-8442-ad8360434003'
+    github_pr_org_list:
+      - 'omec-project'
+
+    jobs:
+      - 'omec-fossa':
+          pipeline-file: 'omec-fossa-scan.groovy'
+          build-node: 'omec-qa'
+      - 'omec-reuse':
+          pipeline-file: 'omec-reuse-scan.groovy'
+          build-node: 'omec-qa'
+
 # Combined pipeline
 - job-template:
     id: 'omec-combined'
diff --git a/jjb/pipeline/voltha-scale-measurements.groovy b/jjb/pipeline/voltha-scale-measurements.groovy
index 0033d3a..87b8656 100644
--- a/jjb/pipeline/voltha-scale-measurements.groovy
+++ b/jjb/pipeline/voltha-scale-measurements.groovy
@@ -25,13 +25,14 @@
     stage('set-description') {
       steps {
         script {
-          currentBuild.description = "${onuPerPon} ONU x ${ponPorts} PON - BBSIM Delay ${BBSIMdelay}"
+          currentBuild.description = "$BUILD_TIMESTAMP"
         }
       }
     }
     stage('cleanup') {
       steps {
         sh '''
+          rm -rf voltha-devices.txt onos-ports.txt total-time.txt onu-activation.txt
           for hchart in \$(helm list -q | grep -E -v 'docker-registry|cord-kafka|etcd-operator');
           do
               echo "Purging chart: \${hchart}"
@@ -54,11 +55,18 @@
       steps {
         sh '''
           helm install -n onos onf/onos --set images.onos.repository=voltha/voltha-onos --set images.onos.tag=4.0.1
-          helm install -n voltha onf/voltha -f /home/cord/voltha-scale/voltha-values.yaml
-          helm install -n openolt onf/voltha-adapter-openolt -f /home/cord/voltha-scale/voltha-values.yaml
-          helm install -n openonu onf/voltha-adapter-openonu -f /home/cord/voltha-scale/voltha-values.yaml
 
-          helm install -n bbsim onf/bbsim --set pon=${ponPorts},onu=${onuPerPon},auth=${bbsimAuth},dhcp=${bbsimDhcp},delay=${BBSIMdelay}
+          IFS=: read -r volthaRepo volthaTag <<< ${volthaImg}
+          helm install -n voltha onf/voltha -f /home/cord/voltha-scale/voltha-values.yaml --set images.voltha.repository=${volthaRepo},images.voltha.tag=${volthaTag}
+
+          IFS=: read -r openoltAdapterRepo openoltAdapterTag <<< ${openoltAdapterImg}
+          helm install -n openolt onf/voltha-adapter-openolt -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_olt.repository=${openoltAdapterRepo},images.adapter_open_olt.tag=${openoltAdapterTag}
+
+          IFS=: read -r openonuAdapterRepo openonuAdapterTag <<< ${openonuAdapterImg}
+          helm install -n openonu onf/voltha-adapter-openonu -f /home/cord/voltha-scale/voltha-values.yaml --set images.adapter_open_olt.repository=${openonuAdapterRepo},images.adapter_open_olt.tag=${openonuAdapterTag}
+
+          IFS=: read -r bbsimRepo bbsimTag <<< ${bbsimImg}
+          helm install -n bbsim onf/bbsim --set pon=${ponPorts},onu=${onuPerPon},auth=${bbsimAuth},dhcp=${bbsimDhcp},delay=${BBSIMdelay},images.bbsim.repository=${bbsimRepo},images.bbsim.tag=${bbsimTag}
           helm install -n radius onf/freeradius
 
           if [ ! -z ${bbsimImg} ];
@@ -169,28 +177,41 @@
     }
   }
   post {
-    always {
+    success {
       plot([
         csvFileName: 'plot-onu-activation.csv',
         csvSeries: [[displayTableFlag: false, exclusionValues: '', file: 'onu-activation.txt', inclusionFlag: 'OFF', url: ''], [displayTableFlag: false, exclusionValues: '', file: 'total-time.txt', inclusionFlag: 'OFF', url: '']],
-        group: 'Voltha-Scale-Numbers', numBuilds: '100', style: 'line', title: 'Time (${BBSIMdelay} Delay)', yaxis: 'Time (s)'
+        group: 'Voltha-Scale-Numbers', numBuilds: '100', style: 'line', title: "Time (${BBSIMdelay}s Delay)", yaxis: 'Time (s)', useDescr: true
       ])
+    }
+    always {
+      sh '''
+        echo $(voltctl device list | grep -v OLT | grep ACTIVE | wc -l) > onus.txt
+        echo "#-of-ONUs" > no_onus.txt
+        cat onus.txt >> no_onus.txt
+
+        echo $(sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports -e | grep BBSM | wc -l) > ports.txt
+        echo "#-of-ports" > no_ports.txt
+        cat ports.txt >> no_ports.txt
+
+        kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
+        voltctl device list -o json > device-list.json
+        python -m json.tool device-list.json > volt-device-list.json
+        sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports > onos-ports.txt
+        '''
+      plot([
+        csvFileName: 'plot-numbers.csv',
+        csvSeries: [[displayTableFlag: false, exclusionValues: '', file: 'no_onus.txt', inclusionFlag: 'OFF', url: ''], [displayTableFlag: false, exclusionValues: '', file: 'no_ports.txt', inclusionFlag: 'OFF', url: '']],
+        group: 'Voltha-Scale-Numbers', numBuilds: '100', style: 'line', title: "Activated ONUs and Recognized Ports", yaxis: 'Number of Ports/ONUs', useDescr: true
+      ])
+
+      archiveArtifacts artifacts: '*.log,*.json,*txt'
+
       script {
         sh '''
-          kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
-          voltctl device list -o json > device-list.json
-          python -m json.tool device-list.json > volt-device-list.json
-          rm device-list.json
-          sshpass -e ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 30115 karaf@localhost ports > onos-ports-list.txt
+          rm -rf onus.txt ports.txt voltha-devices.txt onos-ports.txt total-time.txt onu-activation.txt device-list.json
         '''
       }
-      archiveArtifacts artifacts: '*.log,*.json,*txt'
-    }
-    success {
-      sh '''
-        #!/usr/bin/env bash
-        set +e
-      '''
     }
   }
-}
+}
\ No newline at end of file
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index df7e573..e01e54e 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -375,7 +375,7 @@
 
       - string:
           name: extraRobotArgs
-          default: '-i sanity'
+          default: '-i sanityORDeleteOLT'
           description: 'Arguments to pass to robot'
 
     project-type: pipeline
@@ -397,7 +397,7 @@
                 approval-value: '+2'
           projects:
             - project-compare-type: REG_EXP
-              project-pattern: '^(voltha-openolt-adapter|voltha-openonu-adapter)$'
+              project-pattern: '^(voltha-openolt-adapter|voltha-openonu-adapter|voltha-go)$'
               branches:
                 - branch-compare-type: PLAIN
                   branch-pattern: 'master'
@@ -516,7 +516,7 @@
 
       - string:
           name: extraRobotArgs
-          default: '-i sanity'
+          default: '-i sanityORDeleteOLT'
           description: 'Arguments to pass to robot'
 
     project-type: pipeline
diff --git a/jjb/voltha-scale.yaml b/jjb/voltha-scale.yaml
index f150d04..33c33c5 100644
--- a/jjb/voltha-scale.yaml
+++ b/jjb/voltha-scale.yaml
@@ -10,7 +10,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-8-32-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 8
           expectedOnus: 256
@@ -18,15 +18,31 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-8-32-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 8
           expectedOnus: 256
           BBSIMdelay: 1000
       - 'voltha-scale-measurements-periodic':
+          name: 'voltha-scale-measurements-periodic-8-48-200ms'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          onuPerPon: 48
+          ponPorts: 8
+          expectedOnus: 384
+          BBSIMdelay: 200
+      - 'voltha-scale-measurements-periodic':
+          name: 'voltha-scale-measurements-periodic-8-48-1000ms'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          onuPerPon: 48
+          ponPorts: 8
+          expectedOnus: 384
+          BBSIMdelay: 1000
+      - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-32-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 4
           expectedOnus: 128
@@ -34,7 +50,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-32-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 4
           expectedOnus: 128
@@ -42,7 +58,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-16-32-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 16
           expectedOnus: 512
@@ -50,7 +66,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-16-32-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 32
           ponPorts: 16
           expectedOnus: 512
@@ -58,7 +74,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-64-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 64
           ponPorts: 4
           expectedOnus: 256
@@ -66,7 +82,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-64-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 64
           ponPorts: 4
           expectedOnus: 256
@@ -74,7 +90,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-128-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 128
           ponPorts: 4
           expectedOnus: 512
@@ -82,7 +98,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-4-128-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 128
           ponPorts: 4
           expectedOnus: 512
@@ -90,7 +106,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-1-128-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 128
           ponPorts: 1
           expectedOnus: 128
@@ -98,7 +114,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-1-128-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 128
           ponPorts: 1
           expectedOnus: 128
@@ -106,7 +122,7 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-1-64-200ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 64
           ponPorts: 1
           expectedOnus: 64
@@ -114,11 +130,27 @@
       - 'voltha-scale-measurements-periodic':
           name: 'voltha-scale-measurements-periodic-1-64-1000ms'
           build-node: 'onf-pod1-head-node'
-          time-trigger: "H H/3 * * *"
+          time-trigger: "H H/4 * * *"
           onuPerPon: 64
           ponPorts: 1
           expectedOnus: 64
           BBSIMdelay: 1000
+      - 'voltha-scale-measurements-periodic':
+          name: 'voltha-scale-measurements-periodic-1-1-200ms'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          onuPerPon: 1
+          ponPorts: 1
+          expectedOnus: 1
+          BBSIMdelay: 200
+      - 'voltha-scale-measurements-periodic':
+          name: 'voltha-scale-measurements-periodic-1-1-1000ms'
+          build-node: 'onf-pod1-head-node'
+          time-trigger: "H H/4 * * *"
+          onuPerPon: 1
+          ponPorts: 1
+          expectedOnus: 1
+          BBSIMdelay: 1000
       - 'voltha-scale-measurements':
           name: 'voltha-scale-measurements-dev'
           build-node: 'voltha-scale-dev'
@@ -216,14 +248,24 @@
 
       - string:
           name: bbsimImg
-          default:
+          default: 'voltha/bbsim:master'
           description: 'Custom image selection for BBSIM (repo:tag)'
 
       - string:
           name: volthaImg
-          default:
+          default: 'voltha/voltha-rw-core:master'
           description: 'Custom image selection for VOLTHA (repo:tag)'
 
+      - string:
+          name: openoltAdapterImg
+          default: voltha/voltha-openolt-adapter:master
+          description: 'Custom image selection for Openolt Adapter (repo:tag)'
+
+      - string:
+          name: openonuAdapterImg
+          default: voltha/voltha-openonu-adapter:master
+          description: 'Custom image selection for Openonu Adapter (repo:tag)'
+
     project-type: pipeline
     concurrent: false
 
@@ -323,15 +365,25 @@
 
       - string:
           name: bbsimImg
-          default:
+          default: voltha/bbsim:master
           description: 'Custom image selection for BBSIM (repo:tag)'
 
       - string:
           name: volthaImg
-          default:
+          default: voltha/voltha-rw-core:master
           description: 'Custom image selection for VOLTHA (repo:tag)'
 
+      - string:
+          name: openoltAdapterImg
+          default: voltha/voltha-openolt-adapter:master
+          description: 'Custom image selection for Openolt Adapter (repo:tag)'
+
+      - string:
+          name: openonuAdapterImg
+          default: voltha/voltha-openonu-adapter:master
+          description: 'Custom image selection for Openonu Adapter (repo:tag)'
+
     project-type: pipeline
     concurrent: false
 
-    dsl: !include-raw-escape: pipeline/{pipeline-script}
+    dsl: !include-raw-escape: pipeline/{pipeline-script}
\ No newline at end of file