Merge "[VOL-3483] Create new jobs for voltha-2.5 release"
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index cbf9e81..3d91c7b 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -70,7 +70,14 @@
         ])
       }
     }
+    // If the repo under test is not kind-voltha
+    // then download it and checkout the patch
     stage('Download Patch') {
+      when {
+        expression {
+          return "${gerritProject}" != 'kind-voltha';
+        }
+      }
       steps {
         checkout([
           $class: 'GitSCM',
@@ -93,6 +100,21 @@
           """
       }
     }
+    // If the repo under test is kind-voltha we don't need to download it again,
+    // as we already have it, simply checkout the patch
+    stage('Checkout kind-voltha patch') {
+      when {
+        expression {
+          return "${gerritProject}" == 'kind-voltha';
+        }
+      }
+      steps {
+        sh """
+        cd $WORKSPACE/kind-voltha
+        git fetch https://gerrit.opencord.org/kind-voltha ${gerritRefspec} && git checkout FETCH_HEAD
+        """
+      }
+    }
     stage('Create K8s Cluster') {
       steps {
         sh """
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index d1de2e9..bafca75 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -161,14 +161,6 @@
          cd $WORKSPACE
          gzip *-combined.log || true
 
-         ## Collect ONOS log
-         wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-k8s
-         wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-profile
-         chmod 755 onos-diagnostics-k8s
-         pod_names=$(kubectl get pods -lapp=onos-onos-classic -o name | cut -d '/' -f2 | tr '\n' ' ')
-         ./onos-diagnostics-k8s ${pod_names}
-         cp /tmp/onos-diags.tar.gz $WORKSPACE/onos-diags.tar.gz
-
          ## shut down voltha but leave kind-voltha cluster
          cd $HOME/kind-voltha/
          DEPLOY_K8S=n WAIT_ON_DOWN=y ./voltha down
diff --git a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
index ee337e8..f33ec7e 100644
--- a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
+++ b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
@@ -201,14 +201,6 @@
          cd $WORKSPACE
          gzip *-combined.log || true
 
-         ## Collect ONOS log
-         wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-k8s
-         wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-profile
-         chmod 755 onos-diagnostics-k8s
-         pod_names=$(kubectl get pods -lapp=onos-onos-classic -o name | cut -d '/' -f2 | tr '\n' ' ')
-         ./onos-diagnostics-k8s ${pod_names}
-         cp /tmp/onos-diags.tar.gz $WORKSPACE/onos-diags.tar.gz
-
          ## shut down voltha but leave kind-voltha cluster
          cd $HOME/kind-voltha/
          DEPLOY_K8S=n WAIT_ON_DOWN=y ./voltha down