diff options
Diffstat (limited to 'jjb')
-rwxr-xr-x | jjb/xci/xci-run-functest.sh | 11 | ||||
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 11 | ||||
-rwxr-xr-x | jjb/xci/xci-start-new-vm.sh | 11 | ||||
-rw-r--r-- | jjb/xci/xci-verify-jobs.yml | 16 |
4 files changed, 41 insertions, 8 deletions
diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index b2421de32..7c639b75b 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -20,6 +20,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 + # skip the deployment if the scenario is not supported on this distro OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then 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 diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh index b38ebe510..3cec4b3d2 100755 --- a/jjb/xci/xci-start-new-vm.sh +++ b/jjb/xci/xci-start-new-vm.sh @@ -20,6 +20,17 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; 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 + # skip the deployment if the scenario is not supported on this distro OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml index 40e9ee388..da031c96d 100644 --- a/jjb/xci/xci-verify-jobs.yml +++ b/jjb/xci/xci-verify-jobs.yml @@ -129,7 +129,7 @@ parameters: - project-parameter: - project: '{project}' + project: $GERRIT_PROJECT branch: '{branch}' - label: name: SLAVE_LABEL @@ -142,7 +142,7 @@ default: 'true' - string: name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/releng-xci + default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' builders: @@ -159,8 +159,8 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -176,14 +176,14 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck + GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck node-parameters: true kill-phase-on: NEVER abort-all-job: true @@ -209,7 +209,7 @@ parameters: - string: name: PROJECT - default: 'releng-xci' + default: $GERRIT_PROJECT - string: name: DISTRO default: 'ubuntu' @@ -236,7 +236,7 @@ default: 'osa' - string: name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/releng-xci + default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' wrappers: |