Merge "Parameterize the JDK distribution"
diff --git a/jjb/cord-test/att-workflow.yaml b/jjb/cord-test/att-workflow.yaml
index 132781a..d740c68 100644
--- a/jjb/cord-test/att-workflow.yaml
+++ b/jjb/cord-test/att-workflow.yaml
@@ -37,6 +37,7 @@
          config-pod: 'onlab-pod1-qa'
          profile: 'att-workflow'
          branch: 'master'
+         test-repo: 'cord-tester'
          Jenkinsfile: 'Jenkinsfile-attworkflow-test'
 
       # onlab pod2 build
@@ -78,6 +79,7 @@
          config-pod: 'flex-ocp-cord-voltha-master'
          profile: 'att-workflow'
          branch: 'master'
+         test-repo: 'cord-tester'
          Jenkinsfile: 'Jenkinsfile-attworkflow-test'
 
       # flex ocp pod test job - seba-1.0/cord-6.1 release
@@ -86,4 +88,5 @@
          config-pod: 'flex-ocp-cord-voltha16'
          profile: 'att-workflow'
          branch: 'cord-6.1'
+         test-repo: 'cord-tester'
          Jenkinsfile: 'Jenkinsfile-attworkflow-test'
diff --git a/jjb/cord-test/nightly-build-pipeline.yaml b/jjb/cord-test/nightly-build-pipeline.yaml
index 80c949c..a0016ba 100644
--- a/jjb/cord-test/nightly-build-pipeline.yaml
+++ b/jjb/cord-test/nightly-build-pipeline.yaml
@@ -292,7 +292,7 @@
       script-path: '{Jenkinsfile}'
       scm:
         - git:
-           url: '{gerrit-server-url}/cord-tester'
+           url: '{gerrit-server-url}/{test-repo}'
            branches:
              - '{branch}'
 
diff --git a/jjb/cord-test/rcord-lite.yaml b/jjb/cord-test/rcord-lite.yaml
index bef027d..6168a06 100644
--- a/jjb/cord-test/rcord-lite.yaml
+++ b/jjb/cord-test/rcord-lite.yaml
@@ -25,6 +25,7 @@
          testvm: 'qa-testvm-pod'
          config-pod: 'flex-ocp-cord'
          profile: 'rcord-topdown'
+         test-repo: 'cord-tester'
          branch: 'master'
          Jenkinsfile: 'Jenkinsfile-rcordlite-topdown-test'
 
@@ -45,6 +46,7 @@
          config-pod: 'flex-ocp-cord'
          profile: 'rcord-zerotouch'
          branch: 'master'
+         test-repo: 'cord-tester'
          Jenkinsfile: 'Jenkinsfile-rcordlite-zerotouch-test'
 
      # qct pod1 kubernetes build jobs (rcord lite topdown)
@@ -64,4 +66,5 @@
          config-pod: 'qct-pod1'
          profile: 'rcord-topdown'
          branch: 'master'
+         test-repo: 'cord-tester'
          Jenkinsfile: 'Jenkinsfile-rcordlite-topdown-test'
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index 5e6f798..007855c 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -19,3 +19,12 @@
          Jenkinsfile: 'Jenkinsfile-voltha-build'
          oltDebVersion: 'openolt-seba-2.0.deb'
          profile: 'multipleGem'
+
+      # flex pod1 test job - using voltha branch
+      - 'build_pod_test':
+         testvm: 'qa-testvm-pod'
+         config-pod: 'flex-ocp-cord'
+         profile: 'multipleGem'
+         branch: 'master'
+         test-repo: 'voltha-system-tests'
+         Jenkinsfile: 'Jenkinsfile-voltha-test'
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 901d11b..fbba5b5 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -71,6 +71,7 @@
     modern-branches-regexp: '^(master|cord-7.0|cord-6.1|cord-6.0|seba-1.0)$'
     platform-branches-regexp: '^(master|cord-7.0|cord-6.1)$'
     seba-branches-regexp: '^(master|cord-7.0|seba-1.0)$'
+    voltha-stablization-branch: '^(voltha-2.1)$'
 
     # matchs all project repos
     all-projects-regexp: '.*'
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 93f10f8..93b51f8 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -61,7 +61,7 @@
            git clone https://gerrit.opencord.org/voltha-system-tests
            git clone https://github.com/ciena/kind-voltha.git
            cd kind-voltha/
-           DEPLOY_K8S=y JUST_K8S=y ./voltha up
+           DEPLOY_K8S=y JUST_K8S=y FANCY=0 ./voltha up
            """
       }
     }
@@ -70,7 +70,7 @@
       steps {
         sh """
            cd $WORKSPACE/voltha/${gerritProject}/
-           make DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest build
+           make DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest docker-build
            """
       }
     }
@@ -83,7 +83,7 @@
            export TYPE=minimal
            export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
            export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
-           export PATH=/w/workspace/voltha-go-e2e-tests/kind-voltha/bin:$PATH
+           export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
            docker images | grep citest
            for image in \$(docker images -f "reference=*/*citest" --format "{{.Repository}}"); do echo "Pushing \$image to nodes"; kind load docker-image \$image:citest --name voltha-\$TYPE --nodes voltha-\$TYPE-worker,voltha-\$TYPE-worker2; done
            '''
@@ -92,7 +92,7 @@
     stage('Deploy Voltha') {
       steps {
         sh """
-           HELM_FLAG="--set defaults.image_tag=2.1.0 "
+           HELM_FLAG="--set defaults.image_tag=voltha-2.1 "
 
            if [ "${gerritProject}" = "voltha-go" ]; then
              HELM_FLAG+="-f $WORKSPACE/voltha-system-tests/tests/data/ci-test.yaml"
@@ -107,7 +107,8 @@
            fi
 
            cd kind-voltha/
-           EXTRA_HELM_FLAGS='\${HELM_FLAG}' VOLTHA_LOG_LEVEL=DEBUG TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y FANCY=0 ./voltha up
+           echo \$HELM_FLAG
+           EXTRA_HELM_FLAGS=\$HELM_FLAG VOLTHA_LOG_LEVEL=DEBUG TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y FANCY=0 ./voltha up
            """
       }
     }
@@ -118,7 +119,7 @@
            cd kind-voltha/
            export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
            export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
-           export PATH=/w/workspace/voltha-go-e2e-tests/kind-voltha/bin:$PATH
+           export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
            cd $WORKSPACE/voltha-system-tests/tests/sanity
            robot -e notready --critical sanity --noncritical VOL-1705 -v num_onus:1 sanity.robot || true
            '''
@@ -136,7 +137,7 @@
          cp install-minimal.log $WORKSPACE/
          export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
          export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
-         export PATH=/w/workspace/voltha-go-e2e-tests/kind-voltha/bin:$PATH
+         export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
          kubectl get pods --all-namespaces -o jsonpath="{..image}" |tr -s "[[:space:]]" "\n" | sort | uniq -c
          kubectl get nodes -o wide
          kubectl get pods -o wide
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index a90bb13..1dae7cf 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -40,7 +40,7 @@
       steps {
         sh """
            cd kind-voltha/
-           VOLTHA_LOG_LEVEL=DEBUG TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y FANCY=0 ./voltha up
+           EXTRA_HELM_FLAGS="--set defaults.image_tag=voltha-2.1" VOLTHA_LOG_LEVEL=DEBUG TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y FANCY=0 ./voltha up
            """
       }
     }
@@ -52,7 +52,7 @@
            cd kind-voltha/
            export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
            export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
-           export PATH=/w/workspace/voltha-go-e2e-tests/kind-voltha/bin:$PATH
+           export PATH=/w/workspace/voltha-system-tests/kind-voltha/bin:$PATH
            cd $WORKSPACE/voltha-system-tests/tests/sanity
            robot -e notready --critical sanity --noncritical VOL-1705 -v num_onus:1 sanity.robot || true
            '''
@@ -70,7 +70,7 @@
          cp install-minimal.log $WORKSPACE/
          export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
          export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
-         export PATH=/w/workspace/voltha-go-e2e-tests/kind-voltha/bin:$PATH
+         export PATH=/w/workspace/voltha-system-tests/kind-voltha/bin:$PATH
          kubectl get pods --all-namespaces -o jsonpath="{..image}" |tr -s "[[:space:]]" "\n" | sort | uniq -c
          kubectl get nodes -o wide
          kubectl get pods -o wide
diff --git a/jjb/verify/cord-onos-publisher.yaml b/jjb/verify/cord-onos-publisher.yaml
new file mode 100644
index 0000000..cd427c5
--- /dev/null
+++ b/jjb/verify/cord-onos-publisher.yaml
@@ -0,0 +1,19 @@
+---
+# verification jobs for 'cord-onos-publisher' repo
+
+- project:
+    name: cord-onos-publisher
+    project: '{name}'
+
+    jobs:
+      - 'verify-cord-onos-publisher-jobs':
+          branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+    name: 'verify-cord-onos-publisher-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'tag-collision-reject':
+          dependency-jobs: 'verify_cord-onos-publisher_licensed'
+#      - 'make-unit-test':
+#         dest-gopath: "github.com/opencord"
diff --git a/jjb/verify/go-manifest.yaml b/jjb/verify/go-manifest.yaml
index 6b087c2..60cdab2 100644
--- a/jjb/verify/go-manifest.yaml
+++ b/jjb/verify/go-manifest.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-go-manifest-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-go-manifest-jobs'
diff --git a/jjb/verify/manifest.yaml b/jjb/verify/manifest.yaml
index b79a915..c350013 100644
--- a/jjb/verify/manifest.yaml
+++ b/jjb/verify/manifest.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-manifest-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-manifest-jobs'
diff --git a/jjb/verify/ofagent-go.yaml b/jjb/verify/ofagent-go.yaml
new file mode 100644
index 0000000..579a5e1
--- /dev/null
+++ b/jjb/verify/ofagent-go.yaml
@@ -0,0 +1,32 @@
+---
+# verification jobs for 'ofagent-go' repo
+
+- project:
+    name: ofagent-go
+    project: '{name}'
+
+    jobs:
+      - 'verify-ofagent-go-jobs':
+          branch-regexp: '{all-branches-regexp}'
+      - 'publish-ofagent-go-jobs':
+          branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+    name: 'verify-ofagent-go-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'tag-collision-reject':
+          dependency-jobs: 'verify_ofagent-go_licensed'
+      - 'make-unit-test':
+          dest-gopath: "github.com/opencord"
+          unit-test-targets: 'lint'
+          unit-test-keep-going: 'true'
+          junit-allow-empty-results: true
+
+- job-group:
+    name: 'publish-ofagent-go-jobs'
+    jobs:
+      - 'docker-publish':
+          build-timeout: 30
+          docker-repo: 'voltha'
+          dependency-jobs: 'version-tag'
diff --git a/jjb/verify/pyvoltha.yaml b/jjb/verify/pyvoltha.yaml
index ac20aef..a16817d 100644
--- a/jjb/verify/pyvoltha.yaml
+++ b/jjb/verify/pyvoltha.yaml
@@ -7,9 +7,9 @@
 
     jobs:
       - 'verify-pyvoltha-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
       - 'publish-pyvoltha-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
           pypi-index: 'pypi'
 
 - job-group:
diff --git a/jjb/verify/qa-manifest.yaml b/jjb/verify/qa-manifest.yaml
index 09bfbc9..a6fefed 100644
--- a/jjb/verify/qa-manifest.yaml
+++ b/jjb/verify/qa-manifest.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-qa-manifest-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-qa-manifest-jobs'
diff --git a/jjb/verify/seba-manifest.yaml b/jjb/verify/seba-manifest.yaml
index 21bef0c..173d049 100644
--- a/jjb/verify/seba-manifest.yaml
+++ b/jjb/verify/seba-manifest.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-seba-manifest-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-seba-manifest-jobs'
diff --git a/jjb/verify/voltha-go.yaml b/jjb/verify/voltha-go.yaml
index b8ce766..42a2c6d 100644
--- a/jjb/verify/voltha-go.yaml
+++ b/jjb/verify/voltha-go.yaml
@@ -10,6 +10,8 @@
           branch-regexp: '{all-branches-regexp}'
       - 'publish-voltha-go-jobs':
           branch-regexp: '{all-branches-regexp}'
+      - 'voltha-go-system-tests':
+          branch-regexp: '{voltha-stablization-branch}'
 
 - job-group:
     name: 'verify-voltha-go-jobs'
@@ -37,3 +39,9 @@
           build-timeout: 30
           docker-repo: 'voltha'
           dependency-jobs: 'version-tag'
+
+- job-group:
+    name: 'voltha-go-system-tests'
+    jobs:
+      - 'voltha-patch-test':
+         pipeline: 'voltha-bbsim-tests.groovy'
diff --git a/jjb/verify/voltha-openolt-adapter.yaml b/jjb/verify/voltha-openolt-adapter.yaml
index 008b9de..3f9790d 100644
--- a/jjb/verify/voltha-openolt-adapter.yaml
+++ b/jjb/verify/voltha-openolt-adapter.yaml
@@ -10,6 +10,8 @@
           branch-regexp: '{all-branches-regexp}'
       - 'publish-voltha-openolt-adapter-jobs':
           branch-regexp: '{all-branches-regexp}'
+      - 'voltha-openolt-adapter-system-tests':
+          branch-regexp: '{voltha-stablization-branch}'
 
 - job-group:
     name: 'verify-voltha-openolt-adapter-jobs'
@@ -38,3 +40,9 @@
           build-timeout: 30
           docker-repo: 'voltha'
           dependency-jobs: 'version-tag'
+
+- job-group:
+    name: 'voltha-openolt-adapter-system-tests'
+    jobs:
+      - 'voltha-patch-test':
+         pipeline: 'voltha-bbsim-tests.groovy'
diff --git a/jjb/verify/voltha-openonu-adapter.yaml b/jjb/verify/voltha-openonu-adapter.yaml
index 0c76132..248cfe9 100644
--- a/jjb/verify/voltha-openonu-adapter.yaml
+++ b/jjb/verify/voltha-openonu-adapter.yaml
@@ -10,6 +10,8 @@
           branch-regexp: '{all-branches-regexp}'
       - 'publish-voltha-openonu-adapter-jobs':
           branch-regexp: '{all-branches-regexp}'
+      - 'voltha-openonu-adapter-system-tests':
+          branch-regexp: '{voltha-stablization-branch}'
 
 - job-group:
     name: 'verify-voltha-openonu-adapter-jobs'
@@ -29,3 +31,9 @@
           build-timeout: 30
           docker-repo: 'voltha'
           dependency-jobs: 'version-tag'
+
+- job-group:
+    name: 'voltha-openonu-adapter-system-tests'
+    jobs:
+      - 'voltha-patch-test':
+         pipeline: 'voltha-bbsim-tests.groovy'
diff --git a/jjb/verify/voltha-system-tests.yaml b/jjb/verify/voltha-system-tests.yaml
index 98bc99e..ba934a5 100644
--- a/jjb/verify/voltha-system-tests.yaml
+++ b/jjb/verify/voltha-system-tests.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-voltha-system-tests-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-voltha-system-tests-jobs'
diff --git a/jjb/verify/voltha-test-manifest.yaml b/jjb/verify/voltha-test-manifest.yaml
index 811328b..a713f51 100644
--- a/jjb/verify/voltha-test-manifest.yaml
+++ b/jjb/verify/voltha-test-manifest.yaml
@@ -7,7 +7,7 @@
 
     jobs:
       - 'verify-voltha-test-manifest-jobs':
-          branch-regexp: '{supported-branches-regexp}'
+          branch-regexp: '{all-branches-regexp}'
 
 - job-group:
     name: 'verify-voltha-test-manifest-jobs'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 2f095fb..4a3b7c9 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -11,10 +11,6 @@
           name: 'voltha-system-tests'
           pipeline: 'voltha-go-tests.groovy'
 
-    - 'voltha-patch-test':
-         name: 'voltha-bbsim-system-tests'
-         pipeline: 'voltha-bbsim-tests.groovy'
-
 - job-template:
     id: 'voltha-periodic-test'
     name: '{name}'
@@ -72,7 +68,7 @@
 
 - job-template:
     id: 'voltha-patch-test'
-    name: '{name}'
+    name: '{project}_sanity-system-test'
 
     description: |
       <!-- Managed by Jenkins Job Builder -->
@@ -141,14 +137,14 @@
           description: 'test tags'
 
     project-type: pipeline
-    concurrent: false
+    concurrent: true
 
     dsl: !include-raw-escape: pipeline/{pipeline}
 
     triggers:
       - cord-infra-gerrit-trigger-patchset:
           gerrit-server-name: '{gerrit-server-name}'
-          project-regexp: '^(voltha-go|voltha-openolt-adapter|voltha-openonu-adapter|)$'
-          branch-regexp: '^(voltha-2.1)$'
+          project-regexp: '^{project}$'
+          branch-regexp: '{branch-regexp}'
           dependency-jobs: '{dependency-jobs}'
           file-include-regexp: '{all-files-regexp}'