Correctly checking out patches when needed in the VOLTHA tests

Change-Id: I595cf3b43dee5b0d19abe14b9335c7dff59249e9
diff --git a/jjb/pipeline/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha-physical-functional-tests.groovy
index 15eaad7..2d11280 100644
--- a/jjb/pipeline/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-physical-functional-tests.groovy
@@ -39,7 +39,6 @@
           $class: 'GitSCM',
           userRemoteConfigs: [[
             url: "https://gerrit.opencord.org/kind-voltha",
-            refspec: "${kindVolthaChange}"
           ]],
           branches: [[ name: "master", ]],
           extensions: [
@@ -48,6 +47,10 @@
             [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
           ],
         ])
+        sh """
+        cd $WORKSPACE/kind-voltha
+        git fetch https://gerrit.opencord.org/kind-voltha ${gerritRefspec} && git checkout FETCH_HEAD
+        """
       }
     }
     stage('Clone voltha-system-tests') {
@@ -56,7 +59,6 @@
           $class: 'GitSCM',
           userRemoteConfigs: [[
             url: "https://gerrit.opencord.org/voltha-system-tests",
-            refspec: "${volthaSystemTestsChange}"
           ]],
           branches: [[ name: "${branch}", ]],
           extensions: [
@@ -65,6 +67,10 @@
             [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
           ],
         ])
+        sh """
+        cd $WORKSPACE/voltha-system-tests
+        git fetch https://gerrit.opencord.org/voltha-system-tests ${volthaSystemTestsChange} && git checkout FETCH_HEAD
+        """
       }
     }
     stage('Clone cord-tester') {
@@ -73,7 +79,6 @@
           $class: 'GitSCM',
           userRemoteConfigs: [[
             url: "https://gerrit.opencord.org/cord-tester",
-            refspec: "${cordTesterChange}"
           ]],
           branches: [[ name: "master", ]],
           extensions: [
@@ -82,6 +87,10 @@
             [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
           ],
         ])
+        sh """
+        cd $WORKSPACE/cord-tester
+        git fetch https://gerrit.opencord.org/voltha-system-tests ${cordTesterChange} && git checkout FETCH_HEAD
+        """
       }
     }
     stage('Download All the VOLTHA repos') {