diff options
Diffstat (limited to 'jjb/apex')
-rwxr-xr-x | jjb/apex/apex-deploy.sh | 10 | ||||
-rw-r--r-- | jjb/apex/apex-snapshot-create.sh | 12 | ||||
-rwxr-xr-x | jjb/apex/apex-upload-artifact.sh | 11 | ||||
-rw-r--r-- | jjb/apex/apex-verify-jobs.yaml | 22 | ||||
-rw-r--r-- | jjb/apex/apex.yaml | 79 | ||||
-rw-r--r-- | jjb/apex/apex.yaml.j2 | 39 | ||||
-rw-r--r-- | jjb/apex/scenarios.yaml.hidden | 4 |
7 files changed, 119 insertions, 58 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index dfaf2a8b5..f5c6ab108 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -156,16 +156,6 @@ fi # start deployment sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug -if [[ "$PROMOTE" == 'True' ]]; then - echo "CSIT job: setting host route for floating ip routing" - # csit route to allow docker container to reach floating ips - UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo "[0-9\.]+{3}[0-9]+") - if sudo route | grep 192.168.37.128 > /dev/null; then - sudo route del -net 192.168.37.128 netmask 255.255.255.128 - fi - sudo route add -net 192.168.37.128 netmask 255.255.255.128 gw ${UNDERCLOUD} -fi - echo echo "--------------------------------------------------------" echo "Done!" diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh index 7e38d56b4..b73931470 100644 --- a/jjb/apex/apex-snapshot-create.sh +++ b/jjb/apex/apex-snapshot-create.sh @@ -91,10 +91,16 @@ echo "Snapshot saved as apex-${SNAP_TYPE}-snap-${DATE}.tar.gz" # update opnfv properties file if [ "$SNAP_TYPE" == 'csit' ]; then - curl -O -L http://$GS_URL/snapshot.properties - sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1) - sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties + if curl --fail -O -L http://$GS_URL/snapshot.properties; then + sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties + sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties + else + cat << EOF > snapshot.properties +OPNFV_SNAP_URL=${GS_URL}/apex-csit-snap-${DATE}.tar.gz +OPNFV_SNAP_SHA512SUM=${snap_sha} +EOF + fi echo "OPNFV_SNAP_URL=$GS_URL/apex-csit-snap-${DATE}.tar.gz" echo "OPNFV_SNAP_SHA512SUM=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)" echo "Updated properties file: " diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 8743368fb..5c777a824 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -24,7 +24,9 @@ importkey () { git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null #this is where we import the siging key if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then - source $WORKSPACE/releng/utils/gpg_import_key.sh + if ! $WORKSPACE/releng/utils/gpg_import_key.sh; then + echo "WARNING: Failed to run gpg key import" + fi fi } @@ -75,13 +77,16 @@ uploadrpm () { uploadsnap () { # Uploads snapshot artifact and updated properties file echo "Uploading snapshot artifacts" + # snapshot dir is the same node in the create job workspace + # only 1 promotion job can run at a time on a slave + snapshot_dir="${WORKSPACE}/../apex-create-snapshot" if [ -z "$SNAP_TYPE" ]; then echo "ERROR: SNAP_TYPE not provided...exiting" exit 1 fi - gsutil cp $WORKSPACE/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log + gsutil cp ${snapshot_dir}/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log if [ "$SNAP_TYPE" == 'csit' ]; then - gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log + gsutil cp ${snapshot_dir}/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log fi echo "Upload complete for Snapshot" } diff --git a/jjb/apex/apex-verify-jobs.yaml b/jjb/apex/apex-verify-jobs.yaml index 8140d9ef5..0837a76e4 100644 --- a/jjb/apex/apex-verify-jobs.yaml +++ b/jjb/apex/apex-verify-jobs.yaml @@ -10,12 +10,12 @@ - master: &master branch: '{stream}' gs-pathname: '' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-ha' disabled: false - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-ha' disabled: false - danube: &danube branch: 'stable/{stream}' @@ -243,8 +243,8 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - FUNCTEST_SUITE_NAME=healthcheck - FUNCTEST_MODE=tier + FUNCTEST_SUITE_NAME=tempest_smoke_serial + FUNCTEST_MODE=testcase node-parameters: false kill-phase-on: FAILURE abort-all-job: true @@ -343,6 +343,14 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true + - shell: | + if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then + echo 'REPO=opnfv' > functest_repo + else + echo 'REPO=ollivier' > functest_repo + fi + - inject: + properties-file: functest_repo - multijob: name: functest-smoke condition: ALWAYS @@ -351,14 +359,16 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck + FUNCTEST_SUITE_NAME=tempest_smoke_serial + FUNCTEST_MODE=testcase + REPO=$REPO GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true kill-phase-on: NEVER + enable-condition: "def m = '$DEPLOY_SCENARIO' != k8s-nosdn-nofeature-noha" abort-all-job: true git-revision: false - multijob: diff --git a/jjb/apex/apex.yaml b/jjb/apex/apex.yaml index bb5b53d6d..65e558820 100644 --- a/jjb/apex/apex.yaml +++ b/jjb/apex/apex.yaml @@ -8,7 +8,7 @@ - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' - 'apex-daily-{stream}' - - 'apex-csit-promote-daily-{stream}-{os_version}' + - 'apex-csit-promote-daily-{stream}-os-{os_version}' - 'apex-fdio-promote-daily-{stream}' - 'apex-{scenario}-baremetal-{scenario_stream}' - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' @@ -144,10 +144,18 @@ <<: *danube - 'os-ovn-nofeature-noha': <<: *danube + - 'os-nosdn-nofeature-noha': + <<: *master + - 'os-nosdn-nofeature-ha': + <<: *master - 'os-odl-nofeature-noha': <<: *master - 'os-odl-nofeature-ha': <<: *master + - 'os-nosdn-queens-noha': + <<: *master + - 'os-nosdn-queens-ha': + <<: *master - 'os-odl-queens-noha': <<: *master - 'os-odl-queens-ha': @@ -420,6 +428,14 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true + - shell: | + if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then + echo 'REPO=opnfv' > functest_repo + else + echo 'REPO=ollivier' > functest_repo + fi + - inject: + properties-file: functest_repo - multijob: name: functest-smoke condition: ALWAYS @@ -430,6 +446,7 @@ DEPLOY_SCENARIO=$DEPLOY_SCENARIO FUNCTEST_MODE=$FUNCTEST_MODE FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + REPO=$REPO GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -623,8 +640,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/ - && $BUILD_NUMBER % 2 == 1" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -637,8 +653,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/ - && $BUILD_NUMBER % 2 == 0" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -737,13 +752,11 @@ - job-template: name: 'apex-create-snapshot' - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - disabled: false + parameters: + - '{project}-defaults' + builders: - shell: !include-raw-escape: ./apex-snapshot-create.sh @@ -752,13 +765,11 @@ - job-template: name: 'apex-upload-snapshot' - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - disabled: false + parameters: + - '{project}-defaults' + builders: - inject: properties-content: ARTIFACT_TYPE=snapshot @@ -766,7 +777,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-{os_version}' + name: 'apex-csit-promote-daily-{stream}-os-{os_version}' # Job template for promoting CSIT Snapshots # @@ -832,7 +843,7 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: false + current-parameters: true predefined-parameters: | SNAP_TYPE=csit node-parameters: true @@ -844,7 +855,7 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: false + current-parameters: true predefined-parameters: | SNAP_TYPE=csit node-parameters: true @@ -1493,6 +1504,22 @@ name: Baremetal Deploy and Test Phase condition: SUCCESSFUL projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - name: 'apex-os-odl-nofeature-noha-baremetal-master' node-parameters: false current-parameters: false @@ -1509,6 +1536,22 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false + - name: 'apex-os-nosdn-queens-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-queens-ha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - name: 'apex-os-odl-queens-noha-baremetal-master' node-parameters: false current-parameters: false diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2 index 3397f1ed2..f1208d27e 100644 --- a/jjb/apex/apex.yaml.j2 +++ b/jjb/apex/apex.yaml.j2 @@ -8,7 +8,7 @@ - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' - 'apex-daily-{stream}' - - 'apex-csit-promote-daily-{stream}-{os_version}' + - 'apex-csit-promote-daily-{stream}-os-{os_version}' - 'apex-fdio-promote-daily-{stream}' - 'apex-{scenario}-baremetal-{scenario_stream}' - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' @@ -300,6 +300,14 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true + - shell: | + if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then + echo 'REPO=opnfv' > functest_repo + else + echo 'REPO=ollivier' > functest_repo + fi + - inject: + properties-file: functest_repo - multijob: name: functest-smoke condition: ALWAYS @@ -310,6 +318,7 @@ DEPLOY_SCENARIO=$DEPLOY_SCENARIO FUNCTEST_MODE=$FUNCTEST_MODE FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + REPO=$REPO GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -503,8 +512,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/ - && $BUILD_NUMBER % 2 == 1" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -517,8 +525,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/ - && $BUILD_NUMBER % 2 == 0" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -617,13 +624,11 @@ - job-template: name: 'apex-create-snapshot' - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - disabled: false + parameters: + - '{project}-defaults' + builders: - shell: !include-raw-escape: ./apex-snapshot-create.sh @@ -632,13 +637,11 @@ - job-template: name: 'apex-upload-snapshot' - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - disabled: false + parameters: + - '{project}-defaults' + builders: - inject: properties-content: ARTIFACT_TYPE=snapshot @@ -646,7 +649,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-{os_version}' + name: 'apex-csit-promote-daily-{stream}-os-{os_version}' # Job template for promoting CSIT Snapshots # @@ -712,7 +715,7 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: false + current-parameters: true predefined-parameters: | SNAP_TYPE=csit node-parameters: true @@ -724,7 +727,7 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: false + current-parameters: true predefined-parameters: | SNAP_TYPE=csit node-parameters: true diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index 8375f6163..71a6c3dbe 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -1,6 +1,10 @@ master: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' - 'os-odl-nofeature-noha' - 'os-odl-nofeature-ha' + - 'os-nosdn-queens-noha' + - 'os-nosdn-queens-ha' - 'os-odl-queens-noha' - 'os-odl-queens-ha' fraser: |