diff options
Diffstat (limited to 'jjb/xci/xci-set-scenario.sh')
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index 00ca95d45..3b3a0cfab 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -25,6 +25,17 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then exit 0 fi +# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since +# the project where the scenario is coming from is cloned and the patch checked out to the +# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM +# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins. +# if the change is coming to releng-xci, we don't need to do anything since the patch is checked +# out to the WORKSPACE anyways +if [[ $GERRIT_PROJECT != "releng-xci" ]]; then + /bin/rm -rf $WORKSPACE + git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE +fi + WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO /bin/rm -rf $WORK_DIRECTORY && mkdir -p $WORK_DIRECTORY |