diff options
Diffstat (limited to 'jjb/apex')
-rwxr-xr-x | jjb/apex/apex-build.sh | 14 | ||||
-rwxr-xr-x | jjb/apex/apex-deploy.sh | 85 | ||||
-rwxr-xr-x | jjb/apex/apex-download-artifact.sh | 11 | ||||
-rwxr-xr-x | jjb/apex/apex-fetch-snap-info.sh | 46 | ||||
-rw-r--r-- | jjb/apex/apex-functest-scenario.sh | 18 | ||||
-rwxr-xr-x | jjb/apex/apex-iso-verify.sh | 4 | ||||
-rw-r--r-- | jjb/apex/apex-jjb-renderer.py | 4 | ||||
-rw-r--r-- | jjb/apex/apex-project-jobs.yaml | 7 | ||||
-rw-r--r-- | jjb/apex/apex-rtd-jobs.yaml | 20 | ||||
-rw-r--r-- | jjb/apex/apex-snapshot-create.sh | 57 | ||||
-rw-r--r-- | jjb/apex/apex-snapshot-deploy.sh | 40 | ||||
-rwxr-xr-x | jjb/apex/apex-upload-artifact.sh | 23 | ||||
-rw-r--r-- | jjb/apex/apex-verify-jobs.yaml | 41 | ||||
-rw-r--r-- | jjb/apex/apex.yaml | 689 | ||||
-rw-r--r-- | jjb/apex/apex.yaml.j2 | 393 | ||||
-rw-r--r-- | jjb/apex/scenarios.yaml.hidden | 44 |
16 files changed, 1214 insertions, 282 deletions
diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index 0c58a3ca9..618d18110 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -12,7 +12,7 @@ echo if echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$') export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}" - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then # build rpm export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else @@ -23,15 +23,15 @@ elif echo $BUILD_TAG | grep "csit" 1> /dev/null; then export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" elif [ "$ARTIFACT_VERSION" == "daily" ]; then export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") - if [ "$BRANCH" == 'master' ]; then - export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" fi else export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION} - if [ "$BRANCH" == 'master' ]; then - export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" fi @@ -59,7 +59,7 @@ echo "Cache Directory Contents:" echo "-------------------------" ls -al $CACHE_DIRECTORY -if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" != 'master' ]]; then +if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" == 'stable/fraser' ]]; then mkdir -p /tmp/apex-iso/ rm -f /tmp/apex-iso/*.iso cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/ @@ -67,7 +67,7 @@ fi if ! echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then echo "Writing opnfv.properties file" - if [ "$BRANCH" != master ]; then + if [ "$BRANCH" == 'stable/fraser' ]; then # save information regarding artifact into file ( echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 35c2b8544..09d6ca630 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -4,13 +4,16 @@ set -o nounset 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 @@ -27,7 +30,7 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then # we want to use that built in mechanism to avoid re-downloading every job # so we use a dedicated folder to hold the upstream cache UPSTREAM_CACHE=$HOME/upstream_cache - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then mkdir -p ${UPSTREAM_CACHE} RESOURCES=$UPSTREAM_CACHE else @@ -53,7 +56,7 @@ else # set to use different directory here because upon RPM removal this # directory will be wiped in daily UPSTREAM_CACHE=$HOME/upstream_cache - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then mkdir -p ${UPSTREAM_CACHE} RESOURCES=$UPSTREAM_CACHE else @@ -99,12 +102,30 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then sudo ${CLEAN_CMD} ${clean_opts} fi +# These are add-ons to regular scenarios where you can do like +# os-nosdn-nofeature-noha-ipv6, or os-nosdn-nofeature-noha-allinone if echo ${DEPLOY_SCENARIO} | grep ipv6; then IPV6_FLAG=True DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-ipv6//') echo "INFO: IPV6 Enabled" fi +if echo ${DEPLOY_SCENARIO} | grep allinone; then + ALLINONE_FLAG=True + DEPLOY_SCENARIO=$(echo ${DEPLOY_SCENARIO} | sed 's/-allinone//') + echo "INFO: All in one deployment detected" +fi + +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}" DEPLOY_FILE="${DEPLOY_SETTINGS_DIR}/${DEPLOY_SCENARIO}.yaml" @@ -118,11 +139,43 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then if [[ "${DEPLOY_SCENARIO}" =~ fdio|ovs ]]; then DEPLOY_CMD="${DEPLOY_CMD} --virtual-default-ram 12 --virtual-compute-ram 7" fi - if [[ "$JOB_NAME" == *csit* ]]; then - DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml" + if [[ "$ALLINONE_FLAG" == "True" ]]; then + DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 0" + elif [[ "$PROMOTE" == "True" ]]; then + DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2" fi - if [[ "$PROMOTE" == "True" ]]; then - DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 1" + + 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 + SNAP_ENV="${ENV_TYPE}-${OS_VERSION}-environment.yaml" + else + SNAP_ENV="${ENV_TYPE}-environment.yaml" + fi + DEPLOY_CMD="${DEPLOY_CMD} -e ${SNAP_ENV}" fi else # settings for bare metal deployment @@ -137,13 +190,11 @@ else DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}" fi -if [[ "$BRANCH" == "master" ]]; then - echo "Upstream deployment detected" - DEPLOY_CMD="${DEPLOY_CMD} --upstream" -fi - if [ "$IPV6_FLAG" == "True" ]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml" +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" fi @@ -157,16 +208,6 @@ fi # start deployment sudo ${DEPLOY_CMD} -d ${DEPLOY_FILE} -n ${NETWORK_FILE} --debug -if [[ "$JOB_NAME" == *csit* ]]; 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-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index 3efe1cbc7..bc3311d68 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -18,8 +18,8 @@ else fi if [[ "$ARTIFACT_VERSION" =~ dev ]]; then - if [ "$BRANCH" == 'master' ]; then - echo "Skipping download of artifacts for master branch" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + echo "Skipping download of artifacts for master/gambia branch" else # dev build GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$') @@ -45,10 +45,9 @@ else RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//') RPM_LIST=$(basename $OPNFV_RPM_URL) - - if [ "$BRANCH" != 'master' ]; then - # find version of RPM - VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)') + # find version of RPM + VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)') + if [ "$BRANCH" == 'stable/fraser' ]; then # build RPM List which already includes base Apex RPM RPM_LIST+=" opnfv-apex-undercloud-${VERSION_EXTENSION}.noarch.rpm" RPM_LIST+=" python34-opnfv-apex-${VERSION_EXTENSION}.noarch.rpm" diff --git a/jjb/apex/apex-fetch-snap-info.sh b/jjb/apex/apex-fetch-snap-info.sh new file mode 100755 index 000000000..3324aca4f --- /dev/null +++ b/jjb/apex/apex-fetch-snap-info.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +############################################################################## +# Copyright (c) 2018 Tim Rozet (Red Hat) and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +set -o errexit +set -o nounset +set -o pipefail + +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/snap +rm -rf ${tmp_dir} +mkdir -p ${tmp_dir} + +# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these +pushd ${tmp_dir} > /dev/null +echo "Copying overcloudrc and ssh key from Undercloud..." +# Store overcloudrc +UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') +sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./ +# Copy out ssh key of stack from undercloud +sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./ +sudo chmod 0600 id_rsa +popd > /dev/null + +echo "Gathering introspection information" +git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git +pushd sdnvpn/odl-pipeline/lib > /dev/null +sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml +popd > /dev/null +sudo rm -rf sdnvpn + +sudo chown jenkins-ci:jenkins-ci ${tmp_dir}/* + +ls -lrt ${tmp_dir} + +echo "Fetch complete" diff --git a/jjb/apex/apex-functest-scenario.sh b/jjb/apex/apex-functest-scenario.sh new file mode 100644 index 000000000..dcbed4479 --- /dev/null +++ b/jjb/apex/apex-functest-scenario.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p') +if [ "$features" == 'rocky' ]; then + functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-rocky-(noha|ha)/\1-nofeature-\2/p') + echo "DOCKER_TAG=hunter" > functest_scenario +elif [[ "$features" =~ 'rocky' ]]; then + functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_rocky-(noha|ha)/\1-\2-\3/p') + echo "DOCKER_TAG=hunter" > functest_scenario +else + functest_scenario=$DEPLOY_SCENARIO + echo "DOCKER_TAG=$([[ ${BRANCH##*/} == "master" ]] && \ + echo "latest" || echo ${BRANCH##*/})" > functest_scenario +fi +echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_scenario diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh index f34937619..c29d7cb32 100755 --- a/jjb/apex/apex-iso-verify.sh +++ b/jjb/apex/apex-iso-verify.sh @@ -8,8 +8,8 @@ echo "Starting the Apex iso verify." echo "--------------------------------------------------------" echo -if [ "$BRANCH" == 'master' ]; then - echo "Skipping Apex iso verify for master branch" +if [ "$BRANCH" != 'stable/fraser' ]; then + echo "Skipping Apex iso verify for ${BRANCH} branch" exit 0 fi diff --git a/jjb/apex/apex-jjb-renderer.py b/jjb/apex/apex-jjb-renderer.py index 0da47b518..58dc4fff9 100644 --- a/jjb/apex/apex-jjb-renderer.py +++ b/jjb/apex/apex-jjb-renderer.py @@ -20,7 +20,8 @@ def render_jjb(): gspathname = dict() branch = dict() build_slave = dict() - env = Environment(loader=FileSystemLoader('./'), autoescape=True) + env = Environment(loader=FileSystemLoader('./'), autoescape=True, + keep_trailing_newline=True) with open('scenarios.yaml.hidden') as _: scenarios = yaml.safe_load(_) @@ -45,5 +46,6 @@ def render_jjb(): with open('./apex.yaml', 'w') as fh: fh.write(output) + if __name__ == "__main__": render_jjb() diff --git a/jjb/apex/apex-project-jobs.yaml b/jjb/apex/apex-project-jobs.yaml index 700ff60e8..42567ea1b 100644 --- a/jjb/apex/apex-project-jobs.yaml +++ b/jjb/apex/apex-project-jobs.yaml @@ -9,6 +9,11 @@ gs-pathname: '' concurrent-builds: 3 disabled: false + - gambia: &gambia + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + concurrent-builds: 3 + disabled: false - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' @@ -68,7 +73,7 @@ option: 'project' - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify-iso-{stream}' diff --git a/jjb/apex/apex-rtd-jobs.yaml b/jjb/apex/apex-rtd-jobs.yaml new file mode 100644 index 000000000..48e4949f7 --- /dev/null +++ b/jjb/apex/apex-rtd-jobs.yaml @@ -0,0 +1,20 @@ +--- +- project: + name: apex-rtd + project: apex + project-name: apex + + project-pattern: 'apex' + rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfv-apex/47262/' + rtd-token: '134db049c774ab06c41db432e3a042a982f50edf' + + stream: + - master: + branch: '{stream}' + disabled: false + - gambia: + branch: 'stable/{stream}' + disabled: false + + jobs: + - '{project-name}-rtd-jobs' diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh index 342896c7d..e8bf60bd2 100644 --- a/jjb/apex/apex-snapshot-create.sh +++ b/jjb/apex/apex-snapshot-create.sh @@ -27,22 +27,8 @@ echo tmp_dir=$(pwd)/.tmp mkdir -p ${tmp_dir} -# TODO(trozet) remove this after fix goes in for tripleo_inspector to copy these -pushd ${tmp_dir} > /dev/null -echo "Copying overcloudrc and ssh key from Undercloud..." -# Store overcloudrc -UNDERCLOUD=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') -sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:overcloudrc ./ -# Copy out ssh key of stack from undercloud -sudo scp ${SSH_OPTIONS[@]} stack@${UNDERCLOUD}:.ssh/id_rsa ./ -popd > /dev/null - -echo "Gathering introspection information" -git clone https://gerrit.opnfv.org/gerrit/sdnvpn.git -pushd sdnvpn/odl-pipeline/lib > /dev/null -sudo ./tripleo_introspector.sh --out-file ${tmp_dir}/node.yaml -popd > /dev/null -sudo rm -rf sdnvpn +# info should have already been collected in apex-fetch-snap-info so copy it +cp -r /tmp/snap/* ${tmp_dir}/ echo "Shutting down nodes" # Shut down nodes @@ -78,9 +64,7 @@ for node in $nodes; do done # copy virsh net definitions -for net in admin api external storage tenant; do - sudo virsh net-dumpxml ${net} > ${net}.xml -done +sudo virsh net-dumpxml admin > admin.xml sudo chown jenkins-ci:jenkins-ci * @@ -92,13 +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 - 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 - 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 +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 + 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 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 a93421c8e..dd69df3fc 100644 --- a/jjb/apex/apex-snapshot-deploy.sh +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -20,32 +20,44 @@ 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 popd > /dev/null +full_snap_url="gs://${GS_URL}/${OS_VERSION}/${TOPOLOGY}" + echo "Downloading latest snapshot properties file" -if ! wget -O $WORKSPACE/opnfv.properties http://$GS_URL/snapshot.properties; then - echo "ERROR: Unable to find snapshot.properties at ${GS_URL}...exiting" +if ! gsutil cp ${full_snap_url}/snapshot.properties $WORKSPACE/opnfv.properties; then + echo "ERROR: Unable to find snapshot.properties at ${full_snap_url}...exiting" exit 1 fi +echo "Properties contents:" +cat ${WORKSPACE}/opnfv.properties + # find latest check sum -latest_snap_checksum=$(cat 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 fi local_snap_checksum="" +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}" fi else mkdir -p ${SNAP_CACHE} @@ -53,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 @@ -61,7 +78,7 @@ if [ "$local_snap_checksum" != "$latest_snap_checksum" ]; then echo "INFO: SHA mismatch, will download latest snapshot" # wipe cache rm -rf ${SNAP_CACHE}/* - wget --directory-prefix=${SNAP_CACHE}/ ${snap_url} + gsutil cp "gs://${snap_url}" ${SNAP_CACHE}/ snap_tar=$(basename ${snap_url}) else snap_tar=${latest_snap} @@ -141,22 +158,23 @@ done mkdir -p $HOME/cloner-info cp -f overcloudrc $HOME/cloner-info/ -admin_controller_ip=$(cat overcloudrc | grep -Eo -m 1 "192.0.2.[0-9]+") +admin_controller_ip=$(cat overcloudrc | grep -Eo -m 1 "192.0.2.[0-9]+" | head -1) netvirt_url="http://${admin_controller_ip}:8081/restconf/operational/network-topology:network-topology/topology/netvirt:1" source overcloudrc counter=1 while [ "$counter" -le 10 ]; do - if curl --fail --silent ${admin_controller_ip}:80 > /dev/null; then - echo "Overcloud Horizon is up...Checking if OpenDaylight NetVirt is up..." - if curl --fail --silent -u admin:admin ${netvirt_url} > /dev/null; then + echo "Checking if OpenStack is up" + if nc -z ${admin_controller_ip} 9696 > /dev/null; then + echo "Overcloud Neutron is up...Checking if OpenDaylight NetVirt is up..." + if curl --fail --silent -u admin:${SDN_CONTROLLER_PASSWORD} ${netvirt_url} > /dev/null; then echo "OpenDaylight is up. Overcloud deployment complete" exit 0 else echo "OpenDaylight not yet up, try ${counter}" fi else - echo "Horizon/Apache not yet up, try ${counter}" + echo "Neutron not yet up, try ${counter}" fi counter=$((counter+1)) sleep 60 diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 8743368fb..00a0a1c78 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,14 +77,15 @@ 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 - if [ "$SNAP_TYPE" == 'csit' ]; then - gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log - fi + gsutil cp ${snapshot_dir}/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log + gsutil cp ${snapshot_dir}/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log echo "Upload complete for Snapshot" } @@ -109,8 +112,8 @@ fi if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then uploadsnap elif [ "$ARTIFACT_TYPE" == 'iso' ]; then - if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" == 'master' ]]; then - echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/master build" + if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" != 'stable/fraser' ]]; then + echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/${BRANCH} build" exit 0 fi if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then @@ -119,8 +122,8 @@ elif [ "$ARTIFACT_TYPE" == 'iso' ]; then uploadiso elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then if [[ "$ARTIFACT_VERSION" =~ dev ]]; then - if [ "$BRANCH" == 'master' ]; then - echo "will not upload artifacts, master uses upstream" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + echo "will not upload artifacts, ${BRANCH} uses upstream" ARTIFACT_TYPE=none else echo "dev build detected, will upload image tarball" @@ -133,7 +136,7 @@ elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) SRPM_INSTALL_PATH=$BUILD_DIRECTORY SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) - if [ "$BRANCH" != 'master' ]; then + if [[ "$BRANCH" == 'stable/fraser' ]]; then VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//') RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-undercloud-${VERSION_EXTENSION}" RPM_LIST+=" ${RPM_INSTALL_PATH}/python34-opnfv-apex-${VERSION_EXTENSION}" diff --git a/jjb/apex/apex-verify-jobs.yaml b/jjb/apex/apex-verify-jobs.yaml index 7dbd6709b..15e68261a 100644 --- a/jjb/apex/apex-verify-jobs.yaml +++ b/jjb/apex/apex-verify-jobs.yaml @@ -10,12 +10,17 @@ - master: &master branch: '{stream}' gs-pathname: '' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-noha' + disabled: false + - gambia: &gambia + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + 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}' @@ -194,7 +199,11 @@ max-per-node: 3 max-total: 10 option: 'project' - + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - 'apex-.*-promote.*' builders: - description-setter: description: "Built on $NODE_NAME" @@ -243,7 +252,9 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false + FUNCTEST_SUITE_NAME=tempest_smoke + FUNCTEST_MODE=testcase + node-parameters: true kill-phase-on: FAILURE abort-all-job: true git-revision: true @@ -305,10 +316,12 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-virtual.*' + - 'apex-.*-promote.*' + - 'odl-netvirt.*' - throttle: max-per-node: 1 max-total: 10 @@ -340,6 +353,18 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true + - shell: | + features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p') + if [ "$features" == 'rocky' ]; then + echo "DOCKER_TAG=hunter" > functest_tag + elif [[ "$features" =~ 'rocky' ]]; then + echo "DOCKER_TAG=hunter" > functest_tag + else + echo "DOCKER_TAG=''" > functest_tag + fi + - inject: + properties-file: functest_tag + override-build-parameters: true - multijob: name: functest-smoke condition: ALWAYS @@ -348,14 +373,16 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck + 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 = '$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 4e8e7cf40..80a4d82f5 100644 --- a/jjb/apex/apex.yaml +++ b/jjb/apex/apex.yaml @@ -8,12 +8,13 @@ - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' - 'apex-daily-{stream}' - - 'apex-csit-promote-daily-{stream}-{os_version}' + - '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}' - 'apex-upload-snapshot' - 'apex-create-snapshot' + - 'apex-fetch-snap-info' - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' # stream: branch with - in place of / (eg. stable-arno) @@ -25,17 +26,27 @@ build-slave: 'apex-build-master' virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-noha' scenario_stream: 'master' disable_daily: false disable_promote: false + - gambia: &gambia + branch: 'stable/gambia' + gs-pathname: '/gambia' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-nosdn-nofeature-ha' + scenario_stream: 'gambia' + disable_daily: false + disable_promote: false - fraser: &fraser branch: 'stable/fraser' gs-pathname: '/fraser' build-slave: 'apex-build-master' virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-ha' scenario_stream: 'fraser' disable_daily: false disable_promote: true @@ -62,36 +73,34 @@ disable_promote: true scenario: - - 'os-nosdn-nofeature-noha': - <<: *fraser - 'os-nosdn-nofeature-ha': <<: *fraser - - 'os-odl-nofeature-ha': + - 'os-odl-bgpvpn-ha': <<: *fraser + - 'os-nosdn-nofeature-noha': + <<: *gambia + - 'os-nosdn-nofeature-ha': + <<: *gambia + - 'os-nosdn-nofeature-ha-ipv6': + <<: *gambia - 'os-odl-nofeature-noha': - <<: *fraser + <<: *gambia + - 'os-odl-nofeature-ha': + <<: *gambia + - 'k8s-nosdn-nofeature-noha': + <<: *gambia - 'os-odl-bgpvpn-ha': - <<: *fraser - - 'os-ovn-nofeature-noha': - <<: *fraser - - 'os-nosdn-fdio-noha': - <<: *fraser - - 'os-nosdn-fdio-ha': - <<: *fraser - - 'os-nosdn-bar-ha': - <<: *fraser - - 'os-nosdn-bar-noha': - <<: *fraser - - 'os-nosdn-ovs_dpdk-noha': - <<: *fraser - - 'os-nosdn-ovs_dpdk-ha': - <<: *fraser - - 'os-odl-sfc-noha': - <<: *fraser + <<: *gambia + - 'os-odl-bgpvpn-noha': + <<: *gambia - 'os-odl-sfc-ha': - <<: *fraser + <<: *gambia + - 'os-odl-sfc-noha': + <<: *gambia - 'os-nosdn-calipso-noha': - <<: *fraser + <<: *gambia + - 'os-ovn-nofeature-ha': + <<: *gambia - 'os-nosdn-nofeature-noha': <<: *danube - 'os-nosdn-nofeature-ha': @@ -144,13 +153,51 @@ <<: *danube - 'os-ovn-nofeature-noha': <<: *danube + - 'os-nosdn-nofeature-noha': + <<: *master + - 'os-nosdn-nofeature-ha': + <<: *master + - 'os-nosdn-nofeature-ha-ipv6': + <<: *master - 'os-odl-nofeature-noha': <<: *master - 'os-odl-nofeature-ha': <<: *master - - 'os-odl-queens-noha': + - 'os-nosdn-rocky-noha': + <<: *master + - 'os-nosdn-rocky-ha': + <<: *master + - 'os-nosdn-rocky-ha-ipv6': + <<: *master + - 'os-odl-rocky-noha': + <<: *master + - 'os-odl-rocky-ha': <<: *master - - 'os-odl-queens-ha': + - 'k8s-nosdn-nofeature-noha': + <<: *master + - 'os-odl-bgpvpn-ha': + <<: *master + - 'os-odl-bgpvpn-noha': + <<: *master + - 'os-odl-bgpvpn_queens-ha': + <<: *master + - 'os-odl-bgpvpn_queens-noha': + <<: *master + - 'os-odl-sfc-ha': + <<: *master + - 'os-odl-sfc-noha': + <<: *master + - 'os-odl-sfc_rocky-ha': + <<: *master + - 'os-odl-sfc_rocky-noha': + <<: *master + - 'os-nosdn-calipso-noha': + <<: *master + - 'os-nosdn-calipso_rocky-noha': + <<: *master + - 'os-ovn-nofeature-ha': + <<: *master + - 'os-ovn-rocky-ha': <<: *master - 'os-nosdn-nofeature-noha': <<: *euphrates @@ -186,19 +233,32 @@ <<: *euphrates - 'os-odl-sfc-ha': <<: *euphrates - - 'os-nosdn-calipso-noha': - <<: *euphrates platform: - 'baremetal' - 'virtual' os_version: - - 'pike' - - 'queens' - - 'master' - - + - 'queens': + os_scenario: 'nofeature' + odl_branch: 'stable/oxygen' + - 'rocky': + os_scenario: 'rocky' + odl_branch: 'stable/oxygen' + - 'master': + os_scenario: 'nofeature' + odl_branch: 'stable/fluorine' + + topology: + - 'noha' + - 'ha' + - 'noha-allinone' + + snap_type: + - csit: + sdn: 'odl' + - functest: + sdn: 'nosdn' # Fetch Logs Job - job-template: name: 'apex-fetch-logs-{stream}' @@ -252,7 +312,7 @@ - logrotate-default - build-blocker: use-build-blocker: false - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-deploy.*' - throttle: @@ -329,13 +389,14 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-deploy.*' - 'functest.*' - 'yardstick.*' - 'dovetail.*' - 'storperf.*' + - 'odl-netvirt.*' - throttle: max-per-node: 1 max-total: 10 @@ -365,6 +426,7 @@ parameters: - '{project}-defaults' - '{project}-virtual-{stream}-defaults' + - 'functest-suite-parameter' - project-parameter: project: '{project}' branch: '{branch}' @@ -383,13 +445,14 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-runner.*' - - 'apex-.*-promote.*' - 'apex-run.*' - 'apex-virtual-.*' - 'apex-verify-gate-.*' + - 'odl-netvirt.*' + - 'apex-.*-promote.*' - throttle: max-per-node: 1 max-total: 10 @@ -412,6 +475,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=$PROMOTE node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -424,7 +488,8 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -476,7 +541,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -516,6 +581,11 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false + - shell: + !include-raw-escape: ./apex-functest-scenario.sh + - inject: + properties-file: functest_scenario + override-build-parameters: true - multijob: name: 'OPNFV Test Suite' condition: ALWAYS @@ -523,8 +593,9 @@ - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: true git-revision: false @@ -565,16 +636,19 @@ name: DEPLOY_SCENARIO default: '{scenario}' description: "Scenario to deploy with." + - string: + name: DOCKER_TAG + default: '' + description: Default docker tag to pass to functest properties: - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' - - 'apex-.*-promote.*' - 'apex-run.*' - 'apex-testsuite-.+-baremetal-.+' - throttle: @@ -592,8 +666,9 @@ - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: false git-revision: false @@ -613,28 +688,26 @@ name: Dovetail-proposed_tests condition: ALWAYS projects: - - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' + - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}' node-parameters: true current-parameters: false 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: name: Dovetail-default condition: ALWAYS projects: - - name: 'dovetail-apex-baremetal-default-{scenario_stream}' + - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}' node-parameters: true current-parameters: false 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: @@ -688,7 +761,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-daily.*' @@ -729,17 +802,28 @@ git-revision: true - apex-builder-{stream} +# snapshot info fetch +- job-template: + name: 'apex-fetch-snap-info' + + disabled: false + + parameters: + - '{project}-defaults' + + builders: + - shell: + !include-raw-escape: ./apex-fetch-snap-info.sh + # snapshot create - 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 @@ -748,13 +832,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 @@ -762,7 +844,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-{os_version}' + name: 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' # Job template for promoting CSIT Snapshots # @@ -782,54 +864,133 @@ branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" + - string: + name: PROMOTE + default: 'True' + description: "Used for overriding the PROMOTE" + - string: + name: GS_URL + default: 'artifacts.opnfv.org/apex/{os_version}/{topology}' + description: "User for overriding GS_URL from apex params" + - string: + name: OS_VERSION + default: '{os_version}' + description: OpenStack version short name + - string: + name: ODL_BRANCH + default: '{odl_branch}' + description: ODL branch being used + - string: + 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 - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - - 'apex-deploy.*' - 'apex-runner.*' - 'apex-daily.*' + - 'apex-.*-promote.*' + - 'odl-netvirt.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' triggers: - - timed: '0 12 * * 0' + - '{stream}-{snap_type}-{os_version}' builders: - multijob: - name: deploy-virtual + name: apex-virtual-deploy condition: SUCCESSFUL projects: - name: 'apex-deploy-virtual-{stream}' - current-parameters: false + current-parameters: true predefined-parameters: | - DEPLOY_SCENARIO=os-odl-{os_version}-noha + DEPLOY_SCENARIO=os-{sdn}-{os_scenario}-{topology} OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: fetch snapshot info + condition: SUCCESSFUL + projects: + - name: 'apex-fetch-snap-info' + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: functest-smoke + name: test phase condition: SUCCESSFUL + execution-type: SEQUENTIALLY projects: + - name: cperf-apex-csit-master + predefined-parameters: | + ODL_BRANCH=$ODL_BRANCH + RC_FILE_PATH=/tmp/csit/overcloudrc + NODE_FILE_PATH=/tmp/csit/node.yaml + SSH_KEY_PATH=/tmp/csit/id_rsa + 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=os-odl-{os_version}-noha - FUNCTEST_SUITE_NAME=tempest_smoke_serial + 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: FAILURE + 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: | + 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 abort-all-job: true git-revision: false - multijob: @@ -837,9 +998,7 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -849,9 +1008,7 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -883,7 +1040,7 @@ properties: - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' @@ -955,7 +1112,7 @@ project-type: 'multijob' - disabled: false + disabled: true node: 'flex-pod2' @@ -989,7 +1146,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -1058,7 +1215,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -1152,14 +1309,6 @@ name: Baremetal Deploy and Test Phase condition: SUCCESSFUL projects: - - name: 'apex-os-nosdn-nofeature-noha-baremetal-fraser' - 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-fraser' node-parameters: false current-parameters: false @@ -1168,7 +1317,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-nofeature-ha-baremetal-fraser' + - name: 'apex-os-odl-bgpvpn-ha-baremetal-fraser' node-parameters: false current-parameters: false predefined-parameters: | @@ -1176,7 +1325,16 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-nofeature-noha-baremetal-fraser' + +# gambia Builder +- builder: + name: apex-builder-gambia + builders: + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1184,7 +1342,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-bgpvpn-ha-baremetal-fraser' + - name: 'apex-os-nosdn-nofeature-ha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1192,7 +1350,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-ovn-nofeature-noha-baremetal-fraser' + - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1200,7 +1358,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-fdio-noha-baremetal-fraser' + - name: 'apex-os-odl-nofeature-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1208,7 +1366,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-fdio-ha-baremetal-fraser' + - name: 'apex-os-odl-nofeature-ha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1216,7 +1374,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-bar-ha-baremetal-fraser' + - name: 'apex-k8s-nosdn-nofeature-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1224,7 +1382,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-bar-noha-baremetal-fraser' + - name: 'apex-os-odl-bgpvpn-ha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1232,7 +1390,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-ovs_dpdk-noha-baremetal-fraser' + - name: 'apex-os-odl-bgpvpn-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1240,7 +1398,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-ovs_dpdk-ha-baremetal-fraser' + - name: 'apex-os-odl-sfc-ha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1248,7 +1406,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-sfc-noha-baremetal-fraser' + - name: 'apex-os-odl-sfc-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1256,7 +1414,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-sfc-ha-baremetal-fraser' + - name: 'apex-os-nosdn-calipso-noha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1264,7 +1422,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-calipso-noha-baremetal-fraser' + - name: 'apex-os-ovn-nofeature-ha-baremetal-gambia' node-parameters: false current-parameters: false predefined-parameters: | @@ -1498,6 +1656,30 @@ 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-nosdn-nofeature-ha-ipv6-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 @@ -1514,7 +1696,63 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-queens-noha-baremetal-master' + - name: 'apex-os-nosdn-rocky-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-rocky-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-nosdn-rocky-ha-ipv6-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-rocky-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-odl-rocky-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-k8s-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-odl-bgpvpn-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-bgpvpn-noha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1522,7 +1760,79 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-queens-ha-baremetal-master' + - name: 'apex-os-odl-bgpvpn_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-bgpvpn_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-odl-sfc-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-sfc-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-odl-sfc_rocky-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-sfc_rocky-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-calipso-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-calipso_rocky-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-ovn-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-ovn-rocky-ha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1675,14 +1985,6 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-calipso-noha-baremetal-euphrates' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - builder: name: 'apex-upload-artifact' builders: @@ -1709,6 +2011,7 @@ ####################### # trigger macros +# timed is in format: 'min hour daymonth month dayweek' ######################## - trigger: name: 'apex-master' @@ -1716,6 +2019,11 @@ - timed: '0 0 1-31/2 * *' - trigger: + name: 'apex-gambia' + triggers: + - timed: '0 4 2-30/2 * *' + +- trigger: name: 'apex-fraser' triggers: - timed: '0 0 2-30/2 * *' @@ -1729,3 +2037,152 @@ name: 'apex-danube' triggers: - timed: '0 3 1 1 7' + +- trigger: + name: 'master-csit-master' + triggers: + - timed: '0 5 * * *' + +- trigger: + name: 'master-csit-rocky' + triggers: + - timed: '0 5 * * *' + +- trigger: + name: 'master-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-queens' + triggers: + - timed: '0 5 * * *' + +- trigger: + 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-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'fraser-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-queens' + triggers: + - timed: '' diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2 index 5230e7a2c..7203cb4b9 100644 --- a/jjb/apex/apex.yaml.j2 +++ b/jjb/apex/apex.yaml.j2 @@ -8,12 +8,13 @@ - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' - 'apex-daily-{stream}' - - 'apex-csit-promote-daily-{stream}-{os_version}' + - '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}' - 'apex-upload-snapshot' - 'apex-create-snapshot' + - 'apex-fetch-snap-info' - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' # stream: branch with - in place of / (eg. stable-arno) @@ -25,17 +26,27 @@ build-slave: 'apex-build-master' virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-noha' scenario_stream: 'master' disable_daily: false disable_promote: false + - gambia: &gambia + branch: 'stable/gambia' + gs-pathname: '/gambia' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-nosdn-nofeature-ha' + scenario_stream: 'gambia' + disable_daily: false + disable_promote: false - fraser: &fraser branch: 'stable/fraser' gs-pathname: '/fraser' build-slave: 'apex-build-master' virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' - verify-scenario: 'os-odl-nofeature-ha' + verify-scenario: 'os-nosdn-nofeature-ha' scenario_stream: 'fraser' disable_daily: false disable_promote: true @@ -74,11 +85,26 @@ - 'virtual' os_version: - - 'pike' - - 'queens' - - 'master' - - + - 'queens': + os_scenario: 'nofeature' + odl_branch: 'stable/oxygen' + - 'rocky': + os_scenario: 'rocky' + odl_branch: 'stable/oxygen' + - 'master': + os_scenario: 'nofeature' + odl_branch: 'stable/fluorine' + + topology: + - 'noha' + - 'ha' + - 'noha-allinone' + + snap_type: + - csit: + sdn: 'odl' + - functest: + sdn: 'nosdn' # Fetch Logs Job - job-template: name: 'apex-fetch-logs-{stream}' @@ -132,7 +158,7 @@ - logrotate-default - build-blocker: use-build-blocker: false - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-deploy.*' - throttle: @@ -209,13 +235,14 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-deploy.*' - 'functest.*' - 'yardstick.*' - 'dovetail.*' - 'storperf.*' + - 'odl-netvirt.*' - throttle: max-per-node: 1 max-total: 10 @@ -245,6 +272,7 @@ parameters: - '{project}-defaults' - '{project}-virtual-{stream}-defaults' + - 'functest-suite-parameter' - project-parameter: project: '{project}' branch: '{branch}' @@ -263,13 +291,14 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-runner.*' - - 'apex-.*-promote.*' - 'apex-run.*' - 'apex-virtual-.*' - 'apex-verify-gate-.*' + - 'odl-netvirt.*' + - 'apex-.*-promote.*' - throttle: max-per-node: 1 max-total: 10 @@ -292,6 +321,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=$PROMOTE node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -304,7 +334,8 @@ current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_SUITE_NAME=healthcheck + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -356,7 +387,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -396,6 +427,11 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false + - shell: + !include-raw-escape: ./apex-functest-scenario.sh + - inject: + properties-file: functest_scenario + override-build-parameters: true - multijob: name: 'OPNFV Test Suite' condition: ALWAYS @@ -403,8 +439,9 @@ - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: true git-revision: false @@ -445,16 +482,19 @@ name: DEPLOY_SCENARIO default: '{scenario}' description: "Scenario to deploy with." + - string: + name: DOCKER_TAG + default: '' + description: Default docker tag to pass to functest properties: - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' - - 'apex-.*-promote.*' - 'apex-run.*' - 'apex-testsuite-.+-baremetal-.+' - throttle: @@ -472,8 +512,9 @@ - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DOCKER_TAG=$DOCKER_TAG kill-phase-on: NEVER abort-all-job: false git-revision: false @@ -493,28 +534,26 @@ name: Dovetail-proposed_tests condition: ALWAYS projects: - - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' + - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}' node-parameters: true current-parameters: false 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: name: Dovetail-default condition: ALWAYS projects: - - name: 'dovetail-apex-baremetal-default-{scenario_stream}' + - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}' node-parameters: true current-parameters: false 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: @@ -568,7 +607,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-daily.*' @@ -609,17 +648,28 @@ git-revision: true - apex-builder-{stream} +# snapshot info fetch +- job-template: + name: 'apex-fetch-snap-info' + + disabled: false + + parameters: + - '{project}-defaults' + + builders: + - shell: + !include-raw-escape: ./apex-fetch-snap-info.sh + # snapshot create - 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 @@ -628,13 +678,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 @@ -642,7 +690,7 @@ # CSIT promote - job-template: - name: 'apex-csit-promote-daily-{stream}-{os_version}' + name: 'apex-{snap_type}-promote-daily-{stream}-os-{os_version}-{topology}' # Job template for promoting CSIT Snapshots # @@ -662,54 +710,133 @@ branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" + - string: + name: PROMOTE + default: 'True' + description: "Used for overriding the PROMOTE" + - string: + name: GS_URL + default: 'artifacts.opnfv.org/apex/{os_version}/{topology}' + description: "User for overriding GS_URL from apex params" + - string: + name: OS_VERSION + default: '{os_version}' + description: OpenStack version short name + - string: + name: ODL_BRANCH + default: '{odl_branch}' + description: ODL branch being used + - string: + 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 - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - - 'apex-deploy.*' - 'apex-runner.*' - 'apex-daily.*' + - 'apex-.*-promote.*' + - 'odl-netvirt.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' triggers: - - timed: '0 12 * * 0' + - '{stream}-{snap_type}-{os_version}' builders: - multijob: - name: deploy-virtual + name: apex-virtual-deploy condition: SUCCESSFUL projects: - name: 'apex-deploy-virtual-{stream}' - current-parameters: false + current-parameters: true predefined-parameters: | - DEPLOY_SCENARIO=os-odl-{os_version}-noha + DEPLOY_SCENARIO=os-{sdn}-{os_scenario}-{topology} OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - PROMOTE=True + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: fetch snapshot info + condition: SUCCESSFUL + projects: + - name: 'apex-fetch-snap-info' + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: functest-smoke + name: test phase condition: SUCCESSFUL + execution-type: SEQUENTIALLY projects: + - name: cperf-apex-csit-master + predefined-parameters: | + ODL_BRANCH=$ODL_BRANCH + RC_FILE_PATH=/tmp/csit/overcloudrc + NODE_FILE_PATH=/tmp/csit/node.yaml + SSH_KEY_PATH=/tmp/csit/id_rsa + 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=os-odl-{os_version}-noha - FUNCTEST_SUITE_NAME=tempest_smoke_serial + 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: FAILURE + 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: | + 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 abort-all-job: true git-revision: false - multijob: @@ -717,9 +844,7 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -729,9 +854,7 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: false - predefined-parameters: | - SNAP_TYPE=csit + current-parameters: true node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -763,7 +886,7 @@ properties: - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' @@ -835,7 +958,7 @@ project-type: 'multijob' - disabled: false + disabled: true node: 'flex-pod2' @@ -869,7 +992,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -938,7 +1061,7 @@ - logrotate-default - build-blocker: use-build-blocker: true - block-level: 'NODE' + blocking-level: 'NODE' blocking-jobs: - 'apex-verify.*' - 'apex-runner.*' @@ -1070,6 +1193,7 @@ ####################### # trigger macros +# timed is in format: 'min hour daymonth month dayweek' ######################## - trigger: name: 'apex-master' @@ -1077,6 +1201,11 @@ - timed: '0 0 1-31/2 * *' - trigger: + name: 'apex-gambia' + triggers: + - timed: '0 4 2-30/2 * *' + +- trigger: name: 'apex-fraser' triggers: - timed: '0 0 2-30/2 * *' @@ -1091,3 +1220,151 @@ triggers: - timed: '0 3 1 1 7' +- trigger: + name: 'master-csit-master' + triggers: + - timed: '0 5 * * *' + +- trigger: + name: 'master-csit-rocky' + triggers: + - timed: '0 5 * * *' + +- trigger: + name: 'master-csit-queens' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-master' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-rocky' + triggers: + - timed: '' + +- trigger: + name: 'gambia-csit-queens' + triggers: + - timed: '0 5 * * *' + +- trigger: + 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-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'fraser-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'euphrates-functest-queens' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-master' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-rocky' + triggers: + - timed: '' + +- trigger: + name: 'danube-functest-queens' + triggers: + - timed: '' diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index 8375f6163..a221699f1 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -1,24 +1,43 @@ master: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' + - 'os-nosdn-nofeature-ha-ipv6' - 'os-odl-nofeature-noha' - 'os-odl-nofeature-ha' - - 'os-odl-queens-noha' - - 'os-odl-queens-ha' -fraser: + - 'os-nosdn-rocky-noha' + - 'os-nosdn-rocky-ha' + - 'os-nosdn-rocky-ha-ipv6' + - 'os-odl-rocky-noha' + - 'os-odl-rocky-ha' + - 'k8s-nosdn-nofeature-noha' + - 'os-odl-bgpvpn-ha' + - 'os-odl-bgpvpn-noha' + - 'os-odl-bgpvpn_queens-ha' + - 'os-odl-bgpvpn_queens-noha' + - 'os-odl-sfc-ha' + - 'os-odl-sfc-noha' + - 'os-odl-sfc_rocky-ha' + - 'os-odl-sfc_rocky-noha' + - 'os-nosdn-calipso-noha' + - 'os-nosdn-calipso_rocky-noha' + - 'os-ovn-nofeature-ha' + - 'os-ovn-rocky-ha' +gambia: - 'os-nosdn-nofeature-noha' - 'os-nosdn-nofeature-ha' - - 'os-odl-nofeature-ha' + - 'os-nosdn-nofeature-ha-ipv6' - 'os-odl-nofeature-noha' + - 'os-odl-nofeature-ha' + - 'k8s-nosdn-nofeature-noha' - 'os-odl-bgpvpn-ha' - - 'os-ovn-nofeature-noha' - - 'os-nosdn-fdio-noha' - - 'os-nosdn-fdio-ha' - - 'os-nosdn-bar-ha' - - 'os-nosdn-bar-noha' - - 'os-nosdn-ovs_dpdk-noha' - - 'os-nosdn-ovs_dpdk-ha' - - 'os-odl-sfc-noha' + - 'os-odl-bgpvpn-noha' - 'os-odl-sfc-ha' + - 'os-odl-sfc-noha' - 'os-nosdn-calipso-noha' + - 'os-ovn-nofeature-ha' +fraser: + - 'os-nosdn-nofeature-ha' + - 'os-odl-bgpvpn-ha' euphrates: - 'os-nosdn-nofeature-noha' - 'os-nosdn-nofeature-ha' @@ -37,7 +56,6 @@ euphrates: - 'os-nosdn-kvm_ovs_dpdk-ha' - 'os-odl-sfc-noha' - 'os-odl-sfc-ha' - - 'os-nosdn-calipso-noha' danube: - 'os-nosdn-nofeature-noha' - 'os-nosdn-nofeature-ha' |