Merge "Fix the wrong job description"
diff --git a/jjb/bbr.yaml b/jjb/bbr.yaml
new file mode 100644
index 0000000..12b9da2
--- /dev/null
+++ b/jjb/bbr.yaml
@@ -0,0 +1,47 @@
+---
+# scale test pipeline for BBSim
+
+- project:
+    name: bbr
+    project: '{name}'
+
+    jobs:
+      - 'bbr-jobs':
+          branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+    name: 'bbr-jobs'
+    jobs:
+      - 'bbsim_scale_test'
+
+- job-template:
+    name: 'bbsim_scale_test'
+    id: 'bbsim_scale_test'
+    description: |
+                  <!-- Managed by Jenkins Job Builder -->
+                  Interval scale tests for BBSim using BBR <br />
+                  Created from job-template bbsim_scale_test from ci-management/jjb/bbr.yaml <br />
+                  Created by Matteo Scandolo, teo@opennetworking.org <br />
+                  Copyright (c) 2017 Open Networking Foundation (ONF)
+    project-type: pipeline
+    sandbox: true
+    properties:
+      - cord-infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+          artifact-num-to-keep: '{artifact-num-to-keep}'
+    pipeline-scm:
+      script-path: './tests/bbr.groovy'
+      scm:
+        - git:
+            url: 'https://gerrit.opencord.org/bbsim'
+            branches:
+              - 'master'
+    triggers:
+      - timed: |
+          TZ=America/Los_Angeles
+          H * * * *
+    parameters:
+      - string:
+          name: executorNode
+          default: 'ubuntu16.04-basebuild-4c-8g'
+          description: 'Name of the Jenkins node to run the job on'
diff --git a/jjb/cord-test/nightly-build-pipeline.yaml b/jjb/cord-test/nightly-build-pipeline.yaml
index d4d7f68..063c9b7 100644
--- a/jjb/cord-test/nightly-build-pipeline.yaml
+++ b/jjb/cord-test/nightly-build-pipeline.yaml
@@ -791,7 +791,7 @@
               - '{branch}'
 
 - job-template:
-    name: 'build_{config-pod}_voltha_{release}'
+    name: 'build_{config-pod}_{profile}_voltha_{release}'
     id: build_voltha_pod_release
     description: |
                   <!-- Managed by Jenkins Job Builder -->
@@ -839,6 +839,11 @@
           description: 'The config file'
 
       - string:
+          name: profile
+          default: '{profile}'
+          description: 'Technology Profile pushed to the ETCD'
+
+      - string:
           name: oltDebVersion
           default: '{oltDebVersion}'
           description: 'OLT Software version to install'
@@ -880,10 +885,10 @@
     triggers:
       - timed: |
                  TZ=America/Los_Angeles
-                 H H/3 * * *
+                 H {time} * * *
 
 - job-template:
-    name: 'build_{config-pod}_voltha_{release}_test'
+    name: 'build_{config-pod}_{profile}_voltha_{release}_test'
     id: build_voltha_pod_test
     description: |
                   <!-- Managed by Jenkins Job Builder -->
@@ -930,6 +935,11 @@
           description: 'The config file'
 
       - string:
+          name: profile
+          default: '{profile}'
+          description: 'Technology Profile pushed to the ETCD'
+
+      - string:
           name: branch
           default: '{branch}'
 
@@ -950,6 +960,6 @@
 
     triggers:
       - reverse:
-          jobs: 'build_{config-pod}_voltha_{release}'
+          jobs: 'build_{config-pod}_{profile}_voltha_{release}'
           result: 'success'
 
diff --git a/jjb/cord-test/seba-release.yaml b/jjb/cord-test/seba-release.yaml
index 2e9ae98..b572d6b 100644
--- a/jjb/cord-test/seba-release.yaml
+++ b/jjb/cord-test/seba-release.yaml
@@ -53,6 +53,15 @@
           Jenkinsfile: 'Jenkinsfile-attworkflow-build-released-ver'
           oltDebVersion: 'openolt-master.deb'
 
+     # Flex POD build 2.0
+      - 'build_pod_manual_release':
+          testvm: 'qa-testvm-pod'
+          config-pod: 'flex-ocp-cord'
+          release: '2.0'
+          branch: 'master'
+          Jenkinsfile: 'Jenkinsfile-attworkflow-build-released-ver'
+          oltDebVersion: 'openolt-master.deb'
+
           # # flex OCP pod with olt/onu - release 2.0 build job
           # - 'build_pod_release':
           #     testvm: 'qa-testvm-pod'
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index 16a7b9e..34d3205 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -9,43 +9,140 @@
     build-timeout: '300'
 
     jobs:
-      # flex OCP pod with olt/onu - release voltha2.0 build job
+      # flex OCP pod with olt/onu - release voltha master build job
       - 'build_pod_manual':
           testvm: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
-          release: '2.0'
+          release: 'master'
           branch: 'master'
           test-repo: 'voltha-system-tests'
           Jenkinsfile: 'Jenkinsfile-voltha-build'
           oltDebVersion: 'openolt-seba-2.0.deb'
-          profile: 'multipleGem'
+          profile: '1T4GEM'
 
       # flex pod1 test job - using voltha branch
       - 'build_pod_test':
           testvm: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
-          profile: 'multipleGem'
+          profile: '1T4GEM'
           branch: 'master'
           test-repo: 'voltha-system-tests'
           Jenkinsfile: 'Jenkinsfile-voltha-test'
 
-      # flex OCP pod with olt/onu - timer based job
+      # onlab pod1 OCP pod with olt/onu - testing BAL3.1 release voltha master build job
+      - 'build_pod_manual':
+          testvm: 'onf-build'
+          config-pod: 'onlab-pod1'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+          oltDebVersion: 'openolt_asfvolt16.deb'
+          profile: '1T4GEM-bal31'
+
+      # onlab pod1 test job - BAL3.1 tests using voltha branch
+      - 'build_pod_test':
+          testvm: 'onf-build'
+          config-pod: 'onlab-pod1'
+          profile: '1T4GEM'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-test'
+
+      # flex OCP pod with olt/onu - Default tech profile and timer based job
       - 'build_voltha_pod_release':
           testvm: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
-          release: '2.1'
+          release: 'master'
           branch: 'master'
           test-repo: 'voltha-system-tests'
           Jenkinsfile: 'Jenkinsfile-voltha-build'
           oltDebVersion: 'openolt-seba-2.0.deb'
           configurePod: true
+          profile: 'Default'
+          time: '1'
 
-      # flex pod1 test job - using voltha branch
+      # flex pod1 test job - uses tech profile on voltha branch
       - 'build_voltha_pod_test':
           testvm: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
-          release: '2.1'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          profile: 'Default'
+          Jenkinsfile: 'Jenkinsfile-voltha-test'
+
+      # flex OCP pod with olt/onu - uses 1TCONT/4GEMs tech profile on voltha - timer based job
+      - 'build_voltha_pod_release':
+          testvm: 'qa-testvm-pod'
+          config-pod: 'flex-ocp-cord'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-build'
+          oltDebVersion: 'openolt-seba-2.0.deb'
+          configurePod: true
+          profile: '1T4GEM'
+          time: '2'
+
+      # flex pod1 test job - test job uses 1TCONT/4GEMs tech profile - using voltha branch
+      - 'build_voltha_pod_test':
+          testvm: 'qa-testvm-pod'
+          config-pod: 'flex-ocp-cord'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          profile: '1T4GEM'
+          Jenkinsfile: 'Jenkinsfile-voltha-test'
+
+      # Menlo DEMO-POD - 1 1TCONT 4 4GEMs TechProfile
+      - 'build_pod_manual':
+          testvm: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-build'
+          oltDebVersion: 'openolt-seba-2.0.deb'
+          configurePod: true
+          profile: '1T4GEM'
+      - 'build_pod_test':
+          testvm: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
           branch: 'master'
           test-repo: 'voltha-system-tests'
           Jenkinsfile: 'Jenkinsfile-voltha-test'
+          profile: '1T4GEM'
 
+      # Menlo DEMO-POD - Default TechProfile
+      - 'build_pod_manual':
+          testvm: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
+          release: 'master'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-build'
+          oltDebVersion: 'openolt-seba-2.0.deb'
+          configurePod: true
+          profile: 'Default'
+
+      # ONF DEMO  pod with olt/onu - voltha dev job - timer based 
+      - 'build_pod_timer':
+         testvm: 'menlo-demo-pod'
+         config-pod: 'onf-demo-pod'
+         profile: 'Default'
+         branch: 'master'
+         test-repo: 'voltha-system-tests'
+         Jenkinsfile: 'Jenkinsfile-voltha-build'
+         oltDebVersion: 'openolt-seba-2.0.deb'
+         configurePod: true
+         time: '3'
+
+      # ONF DEM) OCP test job - voltha-master branch - timer based
+      - 'build_pod_test':
+          testvm: 'menlo-demo-pod'
+          config-pod: 'onf-demo-pod'
+          profile: 'Default'
+          branch: 'master'
+          test-repo: 'voltha-system-tests'
+          Jenkinsfile: 'Jenkinsfile-voltha-test'
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 1922dbd..25b2281 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -29,7 +29,7 @@
     archive-artifacts: ''
 
     # build timeout (minutes)
-    build-timeout: 10
+    build-timeout: 20
 
     # timed trigger defaults, crontab syntax
     # H = random value hashed by name of job
@@ -85,7 +85,7 @@
 
     # matching repos that should be version tagged by the version-tag job
     # (basically the same as imagebuilder projects + helm charts + tools
-    version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|tt-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter|voltha-lib-go)$'
+    version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|tt-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter|voltha-lib-go|voltha-python-base)$'
 
     # PyPI related publishing variables
     #
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index df1f1a9..8c592a7 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -109,7 +109,7 @@
              HELM_FLAG+="--set images.adapter_open_onu.tag=citest,images.adapter_open_onu.pullPolicy=Never "
            fi
 
-           if [ "${gerritProject}" = "voltha-bbsim" ]; then
+           if [ "${gerritProject}" = "bbsim" ]; then
              HELM_FLAG+="--set images.bbsim.tag=citest,images.bbsim.pullPolicy=Never "
            fi
 
@@ -181,6 +181,8 @@
          do
            if [[ \$pod == *"-api-"* ]]; then
              kubectl logs \$pod arouter -n voltha > $WORKSPACE/\$pod.log;
+           elif [[ \$pod == "bbsim-"* ]]; then
+             kubectl logs \$pod -n voltha -p > $WORKSPACE/\$pod.log;
            else
              kubectl logs \$pod -n voltha > $WORKSPACE/\$pod.log;
            fi
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index ed22ee3..751c814 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -53,6 +53,7 @@
            export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
            export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
            export PATH=$WORKSPACE/kind-voltha/bin:$PATH
+           export ROBOT_VAR_FILE=$WORKSPACE/voltha-system-tests/tests/data/${robotVarFile}
            make -C $WORKSPACE/voltha-system-tests sanity-kind || true
            '''
       }
@@ -89,6 +90,8 @@
          do
            if [[ \$pod == *"-api-"* ]]; then
              kubectl logs \$pod arouter -n voltha > $WORKSPACE/\$pod.log;
+           elif [[ \$pod == "bbsim-"* ]]; then
+             kubectl logs \$pod -n voltha -p > $WORKSPACE/\$pod.log;
            else
              kubectl logs \$pod -n voltha > $WORKSPACE/\$pod.log;
            fi
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index 2ded191..40705c6 100644
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -40,6 +40,7 @@
 # Use "release" as the default makefile target, can be a space separated list
 RELEASE_TARGETS=${RELEASE_TARGETS:-release}
 
+
 # check that we're on a semver released version, or exit
 pushd "$GERRIT_PROJECT"
   GIT_VERSION=$(git tag -l --points-at HEAD)
@@ -55,7 +56,11 @@
   fi
 popd
 
-# To support golang projects create a GOPATH
+# Set and handle GOPATH and PATH
+export GOPATH=${GOPATH:-$WORKSPACE/go}
+export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:$GOPATH/bin
+
+# To support golang projects that require GOPATH to be set and code checked out there
 # If $DEST_GOPATH is not an empty string:
 # - create GOPATH within WORKSPACE, and destination directory within
 # - set PATH to include $GOPATH/bin and the system go binaries
@@ -64,9 +69,7 @@
 
 DEST_GOPATH=${DEST_GOPATH:-}
 if [ ! -z "$DEST_GOPATH" ]; then
-  export GOPATH=${GOPATH:-$WORKSPACE/go}
   mkdir -p "$GOPATH/src/$DEST_GOPATH"
-  export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:$GOPATH/bin
   release_path="$GOPATH/src/$DEST_GOPATH/$GERRIT_PROJECT"
   mv "$WORKSPACE/$GERRIT_PROJECT" "$release_path"
 else
diff --git a/jjb/verify/bbsim.yaml b/jjb/verify/bbsim.yaml
index 8eb874f..5ee9b93 100644
--- a/jjb/verify/bbsim.yaml
+++ b/jjb/verify/bbsim.yaml
@@ -20,8 +20,10 @@
       - 'make-unit-test':
           build-node: 'ubuntu16.04-basebuild-1c-2g'
           dest-gopath: "github.com/opencord"
-          unit-test-targets: 'test docker-build'
+          unit-test-targets: 'test'
           unit-test-keep-going: 'true'
+      - 'voltha-patch-test':
+          pipeline: 'voltha-bbsim-tests.groovy'
 
 - job-group:
     name: 'publish-bbsim-jobs'
@@ -29,3 +31,8 @@
       - 'docker-publish':
           docker-repo: 'voltha'
           dependency-jobs: 'version-tag'
+      - 'github-release':
+           dependency-jobs: 'version-tag'
+           github-organization: 'opencord'
+           release-targets: 'dep release'
+           artifact-glob: 'release/*'
diff --git a/jjb/verify/mcast.yaml b/jjb/verify/mcast.yaml
index be99a4d..329e415 100644
--- a/jjb/verify/mcast.yaml
+++ b/jjb/verify/mcast.yaml
@@ -16,6 +16,7 @@
           branch-regexp: '^(mcast-1.4)$'
           jdk-distribution: 'java-1.8.0-amazon-corretto'
           name-extension: '-jdk8'
+          junit-allow-empty-results: true
 
 - job-group:
     name: 'mcast-jobs-common'
diff --git a/jjb/verify/voltha-api-server.yaml b/jjb/verify/voltha-api-server.yaml
index c00b9f0..736fa69 100644
--- a/jjb/verify/voltha-api-server.yaml
+++ b/jjb/verify/voltha-api-server.yaml
@@ -20,7 +20,7 @@
       - 'make-unit-test':
           build-node: 'ubuntu16.04-basebuild-2c-4g'
           dest-gopath: "github.com/opencord"
-          unit-test-targets: 'lint sca test docker-build'
+          unit-test-targets: 'lint sca test'
           unit-test-keep-going: 'true'
           junit-allow-empty-results: true
       - 'voltha-patch-test':
diff --git a/jjb/verify/voltha-bbsim.yaml b/jjb/verify/voltha-bbsim.yaml
index 18c0332..7415d71 100644
--- a/jjb/verify/voltha-bbsim.yaml
+++ b/jjb/verify/voltha-bbsim.yaml
@@ -22,8 +22,6 @@
           dest-gopath: "github.com/opencord"
           junit-allow-empty-results: true
           build-node: 'ubuntu16.04-basebuild-1c-2g'
-      - 'voltha-patch-test':
-          pipeline: 'voltha-bbsim-tests.groovy'
 
 - job-group:
     name: 'publish-voltha-bbsim-jobs'
diff --git a/jjb/verify/voltha-helm-charts.yaml b/jjb/verify/voltha-helm-charts.yaml
index 86092ac..f0f48a2 100644
--- a/jjb/verify/voltha-helm-charts.yaml
+++ b/jjb/verify/voltha-helm-charts.yaml
@@ -18,6 +18,7 @@
       - 'verify-helm-lint':
           dependency-jobs: 'verify_voltha-helm-charts_tag-collision'
       - 'voltha-patch-test':
+          dependency-jobs: 'verify_voltha-helm-charts_helm-lint'
           build-timeout: 20
           pipeline: 'voltha-bbsim-tests.groovy'
 
diff --git a/jjb/verify/voltha-python-base.yaml b/jjb/verify/voltha-python-base.yaml
new file mode 100644
index 0000000..ce03fb3
--- /dev/null
+++ b/jjb/verify/voltha-python-base.yaml
@@ -0,0 +1,30 @@
+---
+# verification jobs for 'voltha-python-base' repo
+
+- project:
+    name: voltha-python-base
+    project: '{name}'
+
+    jobs:
+      - 'verify-voltha-python-base-jobs':
+          branch-regexp: '{all-branches-regexp}'
+      - 'publish-voltha-python-base-jobs'
+
+- job-group:
+    name: 'verify-voltha-python-base-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'tag-collision-reject':
+          dependency-jobs: 'verify_voltha-python-base_licensed'
+      - 'make-unit-test':
+          build-timeout: 30
+          unit-test-targets: 'docker-build'
+          junit-allow-empty-results: true
+
+- job-group:
+    name: 'publish-voltha-python-base-jobs'
+    jobs:
+      - 'docker-publish':
+          build-timeout: 30
+          docker-repo: 'voltha'
+          dependency-jobs: 'version-tag'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 55543d6..c32a845 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -59,9 +59,14 @@
 
       - string:
           name: extraHelmFlags
-          default: '--set defaults.image_tag={default-image-tag}'
+          default: '--set defaults.image_tag={default-image-tag},onu=2,pon=2'
           description: 'Helm flags to pass to ./voltha up'
 
+      - string:
+          name: robotVarFile
+          default: 'bbsim-kind-2x2.yaml'
+          description: 'Pod config file to use for tests'
+
     project-type: pipeline
     concurrent: false