including patch download stage in xos-core-api-test

Change-Id: Ic30df16365df2b9e2d19b8a6d2c51c435c5ab6d3
diff --git a/jjb/pipeline/xos-core.groovy b/jjb/pipeline/xos-core.groovy
index 65cef90..6ca735c 100644
--- a/jjb/pipeline/xos-core.groovy
+++ b/jjb/pipeline/xos-core.groovy
@@ -42,6 +42,17 @@
       }
     }
 
+    stage('patch') {
+      steps {
+        sh '''
+           pushd cord
+           PROJECT_PATH=\$(xmllint --xpath "string(//project[@name=\\\"${gerritProject}\\\"]/@path)" .repo/manifest.xml)
+           repo download "\$PROJECT_PATH" "${gerritChangeNumber}/${gerritPatchsetNumber}"
+           popd
+           '''
+      }
+    }
+
     stage('minikube') {
       steps {
         /* see https://github.com/kubernetes/minikube/#linux-continuous-integration-without-vm-support */