From: Morgan Richomme Date: Fri, 23 Nov 2018 16:19:16 +0000 (+0000) Subject: Merge "Add triggers to verify Functest" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=1569d338abfadc2a851e7f842c3fcc22e2d7998d;hp=44807a3a3b14072f2d6318146a024b5d2b6052f5;p=releng.git Merge "Add triggers to verify Functest" --- diff --git a/INFO.yaml b/INFO.yaml index dae36c9b4..6800a9f43 100644 --- a/INFO.yaml +++ b/INFO.yaml @@ -93,6 +93,15 @@ committers: email: 'lhinds@redhat.com' id: 'lukehinds' timezone: 'Europe/London' + - name: 'Cédric Ollivier' + email: 'cedric.ollivier@orange.com' + company: 'orange' + id: 'ollivier' + timezone: 'Europe/Paris' + - name: 'Alexandru Avadanii' + email: 'Alexandru.Avadanii@enea.com' + company: 'enea.com' + id: 'AlexandruAvadanii' tsc: approval: 'http://ircbot.wl.linuxfoundation.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-07-14-14.00.html' changes: @@ -123,3 +132,6 @@ tsc: - type: 'promotion' name: 'Luke Hinds' link: '' + - type: 'promotion' + name: 'Alexandru Avadanii' + link: 'https://gerrit.opnfv.org/gerrit/#/c/64499/' diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 4876b8504..09d6ca630 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -6,13 +6,14 @@ set -o pipefail IPV6_FLAG=False ALLINONE_FLAG=False CSIT_ENV_FLAG=False +FUNCTEST_ENV_FLAG=False # log info to console echo "Starting the Apex deployment." echo "--------------------------------------------------------" echo -if [ -z "$DEPLOY_SCENARIO" ]; then +if [ -z ${DEPLOY_SCENARIO+x} ]; then echo "Deploy scenario not set!" exit 1 else @@ -119,6 +120,10 @@ if echo ${DEPLOY_SCENARIO} | grep csit; then CSIT_ENV_FLAG=True DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-csit//') echo "INFO: CSIT env requested in deploy scenario" +elif echo ${DEPLOY_SCENARIO} | grep functest; then + FUNCTEST_ENV_FLAG=True + DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-functest//') + echo "INFO: Functest env requested in deploy scenario" fi echo "Deploy Scenario set to ${DEPLOY_SCENARIO}" @@ -140,13 +145,37 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2" fi - if [[ "$PROMOTE" == "True" || "$CSIT_ENV_FLAG" == "True" ]]; then + if [[ "$FUNCTEST_ENV_FLAG" == "True" || "$CSIT_ENV_FLAG" == "True" ]]; then + if [[ "$CSIT_ENV_FLAG" == "True" ]]; then + ENV_TYPE="csit" + else + ENV_TYPE="functest" + fi + if [ -z ${OS_VERSION+x} ]; then + echo "INFO: OS_VERSION not passed to deploy, detecting based on branch and scenario" + case $BRANCH in + master) + if [[ "$DEPLOY_SCENARIO" =~ "rocky" ]]; then + OS_VERSION=rocky + else + OS_VERSION=master + fi + ;; + *gambia) + OS_VERSION=queens + ;; + *) + echo "Unable to detection OS_VERSION, aborting" + exit 1 + ;; + esac + fi if [[ "$OS_VERSION" != "master" ]]; then - CSIT_ENV="csit-${OS_VERSION}-environment.yaml" + SNAP_ENV="${ENV_TYPE}-${OS_VERSION}-environment.yaml" else - CSIT_ENV="csit-environment.yaml" + SNAP_ENV="${ENV_TYPE}-environment.yaml" fi - DEPLOY_CMD="${DEPLOY_CMD} -e ${CSIT_ENV}" + DEPLOY_CMD="${DEPLOY_CMD} -e ${SNAP_ENV}" fi else # settings for bare metal deployment @@ -163,7 +192,8 @@ fi if [ "$IPV6_FLAG" == "True" ]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml" -elif [[ "$PROMOTE" == "True" ]]; then +elif [[ "$CSIT_ENV_FLAG" == "True" || "$FUNCTEST_ENV_FLAG" == "True" ]]; then + # We use csit network settings which is single network for snapshots NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_csit.yaml" else NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml" diff --git a/jjb/apex/apex-fetch-snap-info.sh b/jjb/apex/apex-fetch-snap-info.sh index 2cfaa59d7..3324aca4f 100755 --- a/jjb/apex/apex-fetch-snap-info.sh +++ b/jjb/apex/apex-fetch-snap-info.sh @@ -17,7 +17,7 @@ echo "Fetching overcloudrc, ssh key, and node.yaml from deployment..." SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error) -tmp_dir=/tmp/csit +tmp_dir=/tmp/snap rm -rf ${tmp_dir} mkdir -p ${tmp_dir} diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh index f91720883..e8bf60bd2 100644 --- a/jjb/apex/apex-snapshot-create.sh +++ b/jjb/apex/apex-snapshot-create.sh @@ -28,7 +28,7 @@ tmp_dir=$(pwd)/.tmp mkdir -p ${tmp_dir} # info should have already been collected in apex-fetch-snap-info so copy it -cp -r /tmp/csit/* ${tmp_dir}/ +cp -r /tmp/snap/* ${tmp_dir}/ echo "Shutting down nodes" # Shut down nodes @@ -76,19 +76,30 @@ sudo rm -rf ${tmp_dir} echo "Snapshot saved as apex-${SNAP_TYPE}-snap-${DATE}.tar.gz" # update opnfv properties file -if [ "$SNAP_TYPE" == 'csit' ]; then - snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1) - if curl --fail -O -L http://$GS_URL/snapshot.properties; then +snap_sha=$(sha512sum apex-${SNAP_TYPE}-snap-${DATE}.tar.gz | cut -d' ' -f1) + +if curl --fail -O -L http://$GS_URL/snapshot.properties; then + # TODO(trozet): deprecate OPNFV_SNAP_URL for CSIT_SNAP_URL + if [ "$SNAP_TYPE" == 'csit' ]; 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 + fi + sed -i '/^'${SNAP_TYPE}'_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-'${SNAP_TYPE}'-snap-'${DATE}'.tar.gz#};${x;/^$/{s##'${SNAP_TYPE}'_SNAP_URL='${GS_URL}'/apex-'${SNAP_TYPE}'-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties + sed -i '/^'${SNAP_TYPE}'_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//'${SNAP_TYPE}'_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties +else + cat << EOF > snapshot.properties +${SNAP_TYPE}_SNAP_URL=${GS_URL}/apex-${SNAP_TYPE}-snap-${DATE}.tar.gz +${SNAP_TYPE}_SNAP_SHA512SUM=${snap_sha} +EOF + # TODO(trozet): deprecate OPNFV_SNAP_URL for CSIT_SNAP_URL + if [ "$SNAP_TYPE" == 'csit' ]; then + 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: " - cat snapshot.properties fi +echo "${SNAP_TYPE}_SNAP_URL=$GS_URL/apex-${SNAP_TYPE}-snap-${DATE}.tar.gz" +echo "${SNAP_TYPE}_SNAP_SHA512SUM=$(sha512sum apex-${SNAP_TYPE}-snap-${DATE}.tar.gz | cut -d' ' -f1)" +echo "Updated properties file: " +cat snapshot.properties diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh index bd023f558..dd69df3fc 100644 --- a/jjb/apex/apex-snapshot-deploy.sh +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -20,6 +20,11 @@ echo "Deploying Apex snapshot..." echo "--------------------------" echo +if [ -z "$SNAP_TYPE" ]; then + echo "ERROR: SNAP_TYPE not provided...exiting" + exit 1 +fi + echo "Cleaning server" pushd ci > /dev/null sudo opnfv-clean @@ -37,7 +42,7 @@ echo "Properties contents:" cat ${WORKSPACE}/opnfv.properties # find latest check sum -latest_snap_checksum=$(cat ${WORKSPACE}/opnfv.properties | grep OPNFV_SNAP_SHA512SUM | awk -F "=" '{print $2}') +latest_snap_checksum=$(cat ${WORKSPACE}/opnfv.properties | grep ${SNAP_TYPE}_SNAP_SHA512SUM | awk -F "=" '{print $2}') if [ -z "$latest_snap_checksum" ]; then echo "ERROR: checksum of latest snapshot from snapshot.properties is null!" exit 1 @@ -49,7 +54,7 @@ SNAP_CACHE=${SNAP_CACHE}/${OS_VERSION}/${TOPOLOGY} # check snap cache directory exists # if snapshot cache exists, find the checksum if [ -d "$SNAP_CACHE" ]; then - latest_snap=$(ls ${SNAP_CACHE} | grep tar.gz | tail -n 1) + latest_snap=$(ls ${SNAP_CACHE} | grep tar.gz | grep $SNAP_TYPE | tail -n 1) if [ -n "$latest_snap" ]; then local_snap_checksum=$(sha512sum ${SNAP_CACHE}/${latest_snap} | cut -d' ' -f1) echo "Local snap checksum is: ${local_snap_checksum}" @@ -60,7 +65,12 @@ fi # compare check sum and download latest snap if not up to date if [ "$local_snap_checksum" != "$latest_snap_checksum" ]; then - snap_url=$(cat opnfv.properties | grep OPNFV_SNAP_URL | awk -F "=" '{print $2}') + snap_url=$(cat opnfv.properties | grep ${SNAP_TYPE}_SNAP_URL | awk -F "=" '{print $2}') + # TODO(trozet): Remove this once OPNFV url is deprecated + if [[ -z "$snap_url" && "$SNAP_TYPE" == 'csit' ]]; then + echo "WARN: Unable to find snap url for ${SNAP_TYPE}, attempting to use OPNFV" + snap_url=$(cat opnfv.properties | grep OPNFV_SNAP_URL | awk -F "=" '{print $2}') + fi if [ -z "$snap_url" ]; then echo "ERROR: Snap URL from snapshot.properties is null!" exit 1 diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 07198b188..00a0a1c78 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -85,9 +85,7 @@ uploadsnap () { exit 1 fi 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 ${snapshot_dir}/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log - fi + gsutil cp ${snapshot_dir}/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log echo "Upload complete for Snapshot" } diff --git a/jjb/apex/apex.yaml b/jjb/apex/apex.yaml index c7c938569..80a4d82f5 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-{os_version}-{topology}' + - 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' - 'apex-fdio-promote-daily-{stream}' - 'apex-{scenario}-baremetal-{scenario_stream}' - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' @@ -254,6 +254,11 @@ - 'ha' - 'noha-allinone' + snap_type: + - csit: + sdn: 'odl' + - functest: + sdn: 'nosdn' # Fetch Logs Job - job-template: name: 'apex-fetch-logs-{stream}' @@ -839,7 +844,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}' + name: 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' # Job template for promoting CSIT Snapshots # @@ -883,6 +888,10 @@ name: FORCE_PROMOTE default: 'False' description: "Used to force promotion and skip CSIT" + - string: + name: SNAP_TYPE + default: '{snap_type}' + description: Type of snapshot to promote properties: - build-blocker: use-build-blocker: true @@ -891,7 +900,7 @@ - 'apex-verify.*' - 'apex-runner.*' - 'apex-daily.*' - - 'apex-csit-promote.*' + - 'apex-.*-promote.*' - 'odl-netvirt.*' - throttle: max-per-node: 1 @@ -899,7 +908,7 @@ option: 'project' triggers: - - '{stream}-{os_version}' + - '{stream}-{snap_type}-{os_version}' builders: - multijob: @@ -909,7 +918,7 @@ - name: 'apex-deploy-virtual-{stream}' current-parameters: true predefined-parameters: | - DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology} + DEPLOY_SCENARIO=os-{sdn}-{os_scenario}-{topology} OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC @@ -930,7 +939,7 @@ abort-all-job: true git-revision: false - multijob: - name: csit + name: test phase condition: SUCCESSFUL execution-type: SEQUENTIALLY projects: @@ -943,16 +952,36 @@ ODL_CONTAINERIZED=true OS_VERSION=$OS_VERSION SKIP_CSIT=$FORCE_PROMOTE + SNAP_TYPE=$SNAP_TYPE node-parameters: true kill-phase-on: NEVER abort-all-job: false + enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/" - name: cperf-upload-logs-csit predefined-parameters: | ODL_BRANCH=$ODL_BRANCH OS_VERSION=$OS_VERSION + SNAP_TYPE=$SNAP_TYPE node-parameters: true kill-phase-on: FAILURE abort-all-job: false + enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/" + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG + FUNCTEST_SUITE_NAME=tempest_smoke + FUNCTEST_MODE=testcase + 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 = '$SNAP_TYPE' ==~ /functest/" + abort-all-job: true + git-revision: false - name: 'apex-fetch-logs-{stream}' current-parameters: false predefined-parameters: | @@ -970,8 +999,6 @@ projects: - name: 'apex-create-snapshot' current-parameters: true - predefined-parameters: | - SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -982,8 +1009,6 @@ projects: - name: 'apex-upload-snapshot' current-parameters: true - predefined-parameters: | - SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -2014,76 +2039,150 @@ - timed: '0 3 1 1 7' - trigger: - name: 'master-master' + name: 'master-csit-master' triggers: - timed: '0 5 * * *' - trigger: - name: 'master-rocky' + name: 'master-csit-rocky' triggers: - timed: '0 5 * * *' - trigger: - name: 'master-queens' + name: 'master-csit-queens' triggers: - timed: '' - trigger: - name: 'gambia-master' + name: 'gambia-csit-master' triggers: - timed: '' - trigger: - name: 'gambia-rocky' + name: 'gambia-csit-rocky' triggers: - timed: '' - trigger: - name: 'gambia-queens' + name: 'gambia-csit-queens' triggers: - timed: '0 5 * * *' - trigger: - name: 'fraser-master' + name: 'fraser-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'fraser-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'fraser-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-queens' + triggers: + - timed: '' +- trigger: + name: 'master-functest-master' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'master-functest-rocky' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'master-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-queens' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'fraser-functest-master' triggers: - timed: '' - trigger: - name: 'fraser-rocky' + name: 'fraser-functest-rocky' triggers: - timed: '' - trigger: - name: 'fraser-queens' + name: 'fraser-functest-queens' triggers: - timed: '' - trigger: - name: 'euphrates-master' + name: 'euphrates-functest-master' triggers: - timed: '' - trigger: - name: 'euphrates-rocky' + name: 'euphrates-functest-rocky' triggers: - timed: '' - trigger: - name: 'euphrates-queens' + name: 'euphrates-functest-queens' triggers: - timed: '' - trigger: - name: 'danube-master' + name: 'danube-functest-master' triggers: - timed: '' - trigger: - name: 'danube-rocky' + name: 'danube-functest-rocky' triggers: - timed: '' - trigger: - name: 'danube-queens' + name: 'danube-functest-queens' triggers: - timed: '' diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2 index 8edcc2742..7203cb4b9 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-{os_version}-{topology}' + - 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' - 'apex-fdio-promote-daily-{stream}' - 'apex-{scenario}-baremetal-{scenario_stream}' - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' @@ -100,6 +100,11 @@ - 'ha' - 'noha-allinone' + snap_type: + - csit: + sdn: 'odl' + - functest: + sdn: 'nosdn' # Fetch Logs Job - job-template: name: 'apex-fetch-logs-{stream}' @@ -685,7 +690,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}' + name: 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' # Job template for promoting CSIT Snapshots # @@ -729,6 +734,10 @@ name: FORCE_PROMOTE default: 'False' description: "Used to force promotion and skip CSIT" + - string: + name: SNAP_TYPE + default: '{snap_type}' + description: Type of snapshot to promote properties: - build-blocker: use-build-blocker: true @@ -737,7 +746,7 @@ - 'apex-verify.*' - 'apex-runner.*' - 'apex-daily.*' - - 'apex-csit-promote.*' + - 'apex-.*-promote.*' - 'odl-netvirt.*' - throttle: max-per-node: 1 @@ -745,7 +754,7 @@ option: 'project' triggers: - - '{stream}-{os_version}' + - '{stream}-{snap_type}-{os_version}' builders: - multijob: @@ -755,7 +764,7 @@ - name: 'apex-deploy-virtual-{stream}' current-parameters: true predefined-parameters: | - DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology} + DEPLOY_SCENARIO=os-{sdn}-{os_scenario}-{topology} OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC @@ -776,7 +785,7 @@ abort-all-job: true git-revision: false - multijob: - name: csit + name: test phase condition: SUCCESSFUL execution-type: SEQUENTIALLY projects: @@ -789,16 +798,36 @@ ODL_CONTAINERIZED=true OS_VERSION=$OS_VERSION SKIP_CSIT=$FORCE_PROMOTE + SNAP_TYPE=$SNAP_TYPE node-parameters: true kill-phase-on: NEVER abort-all-job: false + enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/" - name: cperf-upload-logs-csit predefined-parameters: | ODL_BRANCH=$ODL_BRANCH OS_VERSION=$OS_VERSION + SNAP_TYPE=$SNAP_TYPE node-parameters: true kill-phase-on: FAILURE abort-all-job: false + enable-condition: "def m = '$SNAP_TYPE' ==~ /csit/" + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG + FUNCTEST_SUITE_NAME=tempest_smoke + FUNCTEST_MODE=testcase + 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 = '$SNAP_TYPE' ==~ /functest/" + abort-all-job: true + git-revision: false - name: 'apex-fetch-logs-{stream}' current-parameters: false predefined-parameters: | @@ -816,8 +845,6 @@ projects: - name: 'apex-create-snapshot' current-parameters: true - predefined-parameters: | - SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -828,8 +855,6 @@ projects: - name: 'apex-upload-snapshot' current-parameters: true - predefined-parameters: | - SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1196,76 +1221,150 @@ - timed: '0 3 1 1 7' - trigger: - name: 'master-master' + name: 'master-csit-master' triggers: - timed: '0 5 * * *' - trigger: - name: 'master-rocky' + name: 'master-csit-rocky' triggers: - timed: '0 5 * * *' - trigger: - name: 'master-queens' + name: 'master-csit-queens' triggers: - timed: '' - trigger: - name: 'gambia-master' + name: 'gambia-csit-master' triggers: - timed: '' - trigger: - name: 'gambia-rocky' + name: 'gambia-csit-rocky' triggers: - timed: '' - trigger: - name: 'gambia-queens' + name: 'gambia-csit-queens' triggers: - timed: '0 5 * * *' - trigger: - name: 'fraser-master' + name: 'fraser-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'fraser-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'fraser-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'danube-csit-queens' + triggers: + - timed: '' +- trigger: + name: 'master-functest-master' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'master-functest-rocky' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'master-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'gambia-functest-queens' + triggers: + - timed: '0 3 * * *' + +- trigger: + name: 'fraser-functest-master' triggers: - timed: '' - trigger: - name: 'fraser-rocky' + name: 'fraser-functest-rocky' triggers: - timed: '' - trigger: - name: 'fraser-queens' + name: 'fraser-functest-queens' triggers: - timed: '' - trigger: - name: 'euphrates-master' + name: 'euphrates-functest-master' triggers: - timed: '' - trigger: - name: 'euphrates-rocky' + name: 'euphrates-functest-rocky' triggers: - timed: '' - trigger: - name: 'euphrates-queens' + name: 'euphrates-functest-queens' triggers: - timed: '' - trigger: - name: 'danube-master' + name: 'danube-functest-master' triggers: - timed: '' - trigger: - name: 'danube-rocky' + name: 'danube-functest-rocky' triggers: - timed: '' - trigger: - name: 'danube-queens' + name: 'danube-functest-queens' triggers: - timed: '' diff --git a/jjb/doctor/doctor.yaml b/jjb/doctor/doctor.yaml index 1ebd22d0a..aeeb29f21 100644 --- a/jjb/doctor/doctor.yaml +++ b/jjb/doctor/doctor.yaml @@ -85,18 +85,15 @@ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE kill-phase-on: FAILURE git-revision: true - - name: 'doctor-verify-sample-all' - execution-type: PARALLEL - projects: - - name: 'doctor-verify-all-apex-sample-x86_64-{stream}' - predefined-parameters: | - PROJECT=$PROJECT - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - kill-phase-on: FAILURE - git-revision: true + - name: 'doctor-verify-all-apex-sample-x86_64-{stream}' + predefined-parameters: | + PROJECT=$PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + kill-phase-on: FAILURE + git-revision: true - multijob: name: 'doctor-verify-congress' execution-type: PARALLEL diff --git a/jjb/fuel/fuel-docker-jobs.yaml b/jjb/fuel/fuel-docker-jobs.yaml index c06848e56..473542d85 100644 --- a/jjb/fuel/fuel-docker-jobs.yaml +++ b/jjb/fuel/fuel-docker-jobs.yaml @@ -29,6 +29,7 @@ node-parameters: false predefined-parameters: | PUSH_IMAGE=$PUSH_IMAGE + CACHE_INVALIDATE=$CACHE_INVALIDATE COMMIT_ID=$COMMIT_ID GERRIT_REFNAME=$GERRIT_REFNAME kill-phase-on: FAILURE @@ -69,6 +70,11 @@ - throttle: max-per-node: 1 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-docker-.*' + blocking-level: 'NODE' scm: - git-scm @@ -186,6 +192,10 @@ name: PUSH_IMAGE default: "true" description: "To enable/disable pushing the image to Dockerhub." + - string: + name: CACHE_INVALIDATE + default: "0" + description: "Set to any non-zero value to force a Docker cache cleanup" - string: name: COMMIT_ID default: "" diff --git a/jjb/ovn4nfv/ovn4nfv-k8s-plugins-project-jobs.yaml b/jjb/ovn4nfv/ovn4nfv-k8s-plugins-project-jobs.yaml index cd8d7e0fb..849be93c1 100644 --- a/jjb/ovn4nfv/ovn4nfv-k8s-plugins-project-jobs.yaml +++ b/jjb/ovn4nfv/ovn4nfv-k8s-plugins-project-jobs.yaml @@ -105,5 +105,5 @@ - builder: name: ovn4nfv-k8s-plugin-unit-tests-golang builders: - - shell: | + - shell: !include-raw: ./golang-make-test.sh diff --git a/jjb/releng/testresults-verify.yaml b/jjb/releng/testresults-verify.yaml index 958833c0f..c4f4c0f0b 100644 --- a/jjb/releng/testresults-verify.yaml +++ b/jjb/releng/testresults-verify.yaml @@ -12,6 +12,7 @@ jobs: - '{module}-verify-{stream}' - '{module}-client-verify-{stream}' + - '{module}-ui-verify-{stream}' project: 'releng-testresults' @@ -30,7 +31,7 @@ triggers: - gerrit-trigger-patchset-created: server: 'gerrit.opnfv.org' - project: '**' + project: '{project}' branch: '{branch}' files: '{module}/**' @@ -61,7 +62,7 @@ triggers: - gerrit-trigger-patchset-created: server: 'gerrit.opnfv.org' - project: '**' + project: '{project}' branch: '{branch}' files: '{module}/{module}-client/**' @@ -76,3 +77,61 @@ publishers: - publish-coverage - email-jenkins-admins-on-failure + +- job-template: + name: '{module}-ui-verify-{stream}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + wrappers: + - nodejs-installator: + name: "testapi node" + + triggers: + - gerrit-trigger-patchset-created: + server: 'gerrit.opnfv.org' + project: '{project}' + branch: '{branch}' + files: '{module}/opnfv_testapi/ui/**' + + builders: + - shell: | + set -e + + if ! which google-chrome > /dev/null; then + #Install Google Chrome + wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee \ + /etc/apt/sources.list.d/google-chrome.list + sudo apt-get update + sudo apt-get install -y google-chrome-stable + fi + + npm -v + node -v + cd ./{module}/opnfv_testapi/ui/ + npm install -g grunt-cli + npm install + grunt e2e + mv ../tests/UI/coverage/cobertura-coverage.xml ../../../coverage.xml # Moving coverage \ + # xml to workspace as required by publish-coverage publisher. + + publishers: + - text-finder-failures + - publish-coverage + - email-jenkins-admins-on-failure + +- publisher: + name: 'text-finder-failures' + publishers: + - text-finder: + regexp: " 0 failures" + also-check-console-output: true + succeed-if-found: true