xci: Clone the repo and checkout the patch for testing 35/50935/1
authorFatih Degirmenci <fdegir@gmail.com>
Mon, 22 Jan 2018 13:36:47 +0000 (14:36 +0100)
committerFatih Degirmenci <fdegir@gmail.com>
Mon, 22 Jan 2018 13:36:47 +0000 (14:36 +0100)
Change-Id: Ie1c2f76b6043133c3821272040b1a2a38de29035
Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
jjb/xci/xci-merge-jobs.yml
jjb/xci/xci-start-new-vm.sh

index f4d039b..3013e44 100644 (file)
       - label:
           name: SLAVE_LABEL
           default: 'xci-virtual'
+      - string:
+          name: DEPLOY_SCENARIO
+          default: '{scenario}'
       - string:
           name: CLEAN_DIB_IMAGES
           default: 'true'
index 46bd312..745113b 100755 (executable)
@@ -39,6 +39,12 @@ export INSTALLER_TYPE=$INSTALLER_TYPE
 export GIT_BASE=$GIT_BASE
 export JENKINS_HOME=$JENKINS_HOME
 
+if [ ! -z ${WORKSPACE+x} ]; then
+    git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT xci/scenarios/$DEPLOY_SCENARIO && cd xci/scenarios/$DEPLOY_SCENARIO
+    git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD
+    cd -
+fi
+
 cd xci
 ./xci-deploy.sh
 EOF