diff options
Diffstat (limited to 'jjb')
29 files changed, 2564 insertions, 984 deletions
diff --git a/jjb/3rd_party_ci/download-netvirt-artifact.sh b/jjb/3rd_party_ci/download-netvirt-artifact.sh index 6aea01d2a..7ecf8d78d 100755 --- a/jjb/3rd_party_ci/download-netvirt-artifact.sh +++ b/jjb/3rd_party_ci/download-netvirt-artifact.sh @@ -6,11 +6,18 @@ set -o pipefail ODL_ZIP=distribution-karaf-0.6.0-SNAPSHOT.zip echo "Attempting to fetch the artifact location from ODL Jenkins" -CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~master~$GERRIT_CHANGE_ID/detail" +if [ "$ODL_BRANCH" != 'master' ]; then + DIST=$(echo ${ODL_BRANCH} | sed -rn 's#([a-zA-Z]+)/([a-zA-Z]+)#\2#p') + ODL_BRANCH=$(echo ${ODL_BRANCH} | sed -rn 's#([a-zA-Z]+)/([a-zA-Z]+)#\1%2F\2#p') +else + DIST='nitrogen' +fi +CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~${ODL_BRANCH}~${GERRIT_CHANGE_ID}/detail" # due to limitation with the Jenkins Gerrit Trigger, we need to use Gerrit REST API to get the change details -ODL_BUILD_JOB_NUM=$(curl -s $CHANGE_DETAILS_URL | grep -Eo 'netvirt-distribution-check-carbon/[0-9]+' | tail -1 | grep -Eo [0-9]+) +ODL_BUILD_JOB_NUM=$(curl --fail -s ${CHANGE_DETAILS_URL} | grep -Eo "netvirt-distribution-check-${DIST}/[0-9]+" | tail -1 | grep -Eo [0-9]+) +DISTRO_CHECK_CONSOLE_LOG="https://logs.opendaylight.org/releng/jenkins092/netvirt-distribution-check-${DIST}/${ODL_BUILD_JOB_NUM}/console.log.gz" +NETVIRT_ARTIFACT_URL=$(curl --fail -s --compressed ${DISTRO_CHECK_CONSOLE_LOG} | grep 'BUNDLE_URL' | cut -d = -f 2) -NETVIRT_ARTIFACT_URL="https://jenkins.opendaylight.org/releng/job/netvirt-distribution-check-carbon/${ODL_BUILD_JOB_NUM}/artifact/${ODL_ZIP}" echo -e "URL to artifact is\n\t$NETVIRT_ARTIFACT_URL" echo "Downloading the artifact. This could take time..." diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index 470e4335e..a937acbed 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -12,6 +12,10 @@ branch: '{stream}' gs-pathname: '' disabled: false + - carbon: + branch: 'stable/carbon' + gs-pathname: '' + disabled: false ##################################### # patch verification phases ##################################### @@ -111,6 +115,7 @@ - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}' current-parameters: false predefined-parameters: | + ODL_BRANCH={branch} BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -125,10 +130,10 @@ name: functest condition: SUCCESSFUL projects: - - name: 'functest-netvirt-virtual-suite-{stream}' + - name: 'functest-netvirt-virtual-suite-master' predefined-parameters: | DEPLOY_SCENARIO=os-odl_l3-nofeature-ha - FUNCTEST_SUITE_NAME=tempest_smoke_serial + FUNCTEST_SUITE_NAME=odl_netvirt RC_FILE_PATH=$HOME/cloner-info/overcloudrc node-parameters: true kill-phase-on: FAILURE diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index b6b2f212a..4e20df96a 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -10,7 +10,7 @@ echo [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY # set OPNFV_ARTIFACT_VERSION if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then - export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER} + export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}" export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" elif echo $BUILD_TAG | grep "csit" 1> /dev/null; then export OPNFV_ARTIFACT_VERSION=csit${BUILD_NUMBER} @@ -23,6 +23,9 @@ else export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" fi +# Temporary hack until we fix apex build script +BUILD_DIRECTORY=${WORKSPACE}/build + # start the build cd $WORKSPACE/ci ./build.sh $BUILD_ARGS diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 06f7622f5..2e00fae90 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -7,64 +7,10 @@ APEX_PKGS="common undercloud" # removed onos for danube IPV6_FLAG=False # log info to console -echo "Starting the Apex virtual deployment." +echo "Starting the Apex deployment." echo "--------------------------------------------------------" echo -if ! rpm -q wget > /dev/null; then - sudo yum -y install wget -fi - -if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then - # Build is from a verify, use local build artifacts (not RPMs) - cd $WORKSPACE/../${BUILD_DIRECTORY} - WORKSPACE=$(pwd) - echo "WORKSPACE modified to $WORKSPACE" - cd $WORKSPACE/ci -elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then - # if artifact name is passed the pull a - # specific artifact from artifacts.opnfv.org - # artifact specified should be opnfv-apex-<version>.noarch.rpm - RPM_INSTALL_PATH=$GS_URL - RPM_LIST=$RPM_INSTALL_PATH/$ARTIFACT_NAME -else - # Use latest RPMS - if [[ $BUILD_DIRECTORY == *apex-build* ]]; then - # Triggered from a daily so RPMS should be in local directory - BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY - echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY" - - if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then - # if opnfv.properties exists then use the - # local build. Source the file so we get local OPNFV vars - source ${BUILD_DIRECTORY}/../opnfv.properties - RPM_INSTALL_PATH=${BUILD_DIRECTORY}/noarch - RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) - else - echo "BUILD_DIRECTORY is from a daily job, so will not use latest from URL" - echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY" - exit 1 - fi - else - # use the latest from artifacts.opnfv.org - # get the latest.properties to get the link to the latest artifact - if ! wget -O $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties; then - echo "ERROR: Unable to find latest.properties at ${GS_URL}...exiting" - exit 1 - fi - # source the file so we get OPNFV vars - source opnfv.properties - RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//') - RPM_LIST=${RPM_INSTALL_PATH}/$(basename $OPNFV_RPM_URL) - fi -fi - -# rename odl_l3 to odl only for master -# this can be removed once all the odl_l3 references -# are updated to odl after the danube jobs are removed -if [[ "$BUILD_DIRECTORY" == *master* ]]; then - DEPLOY_SCENARIO=${DEPLOY_SCENARIO/odl_l3/odl} -fi if [ -z "$DEPLOY_SCENARIO" ]; then echo "Deploy scenario not set!" exit 1 @@ -85,75 +31,60 @@ elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then fi fi -# use local build for verify and promote -if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then - if [ ! -e "${WORKSPACE}/build/lib" ]; then - ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib - fi - DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy" - NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network" - DEPLOY_CMD="$(pwd)/deploy.sh" - IMAGES="${WORKSPACE}/.build/" - BASE="${WORKSPACE}/build" - LIB="${WORKSPACE}/lib" - # Make sure python34 deps are installed - for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do - if ! rpm -q ${dep_pkg} > /dev/null; then - if ! sudo yum install -y ${dep_pkg}; then - echo "Failed to install ${dep_pkg}" - exit 1 - fi - fi - done - - # Make sure jinja2 is installed - for python_pkg in jinja2; do - if ! python3.4 -c "import $python_pkg"; then - echo "$python_pkg package not found for python3.4, attempting to install..." - if ! sudo easy_install-3.4 $python_pkg; then - echo -e "Failed to install $python_pkg package for python3.4" - exit 1 - fi - fi - done - - # Make sure ipxe-roms-qemu package is updated to latest. - # This package is needed for multi virtio nic PXE boot in virtual environment. - sudo yum update -y ipxe-roms-qemu - - if [ -z ${PYTHONPATH:-} ]; then - export PYTHONPATH=${WORKSPACE}/lib/python - else - export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python - fi -# use RPMs +# Dev or RPM/ISO build +if [[ "$ARTIFACT_VERSION" =~ dev ]]; then + # Settings for deploying from git workspace + DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy" + NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network" + DEPLOY_CMD="${WORKSPACE}/ci/deploy.sh" + RESOURCES="${WORKSPACE}/.build/" + CONFIG="${WORKSPACE}/build" + LIB="${WORKSPACE}/lib" + + # Ensure artifacts were downloaded and extracted correctly + # TODO(trozet) add verification here + else - # 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]+)') - # build RPM List which already includes base Apex RPM - for pkg in ${APEX_PKGS}; do - RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm" - done - - # remove old / install new RPMs - if rpm -q opnfv-apex > /dev/null; then - INSTALLED_RPMS=$(rpm -qa | grep apex) - if [ -n "$INSTALLED_RPMS" ]; then - sudo yum remove -y ${INSTALLED_RPMS} - fi - fi + DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/" + NETWORK_SETTINGS_DIR="/etc/opnfv-apex/" + DEPLOY_CMD="opnfv-deploy" + RESOURCES="/var/opt/opnfv/images" + CONFIG="/var/opt/opnfv" + LIB="/var/opt/opnfv/lib" + +fi - if ! sudo yum install -y $RPM_LIST; then - echo "Unable to install new RPMs: $RPM_LIST" +# Install Dependencies +# Make sure python34 dependencies are installed +for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do + if ! rpm -q ${dep_pkg} > /dev/null; then + if ! sudo yum install -y ${dep_pkg}; then + echo "Failed to install ${dep_pkg}" exit 1 fi - - DEPLOY_CMD=opnfv-deploy - DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/" - NETWORK_SETTINGS_DIR="/etc/opnfv-apex/" - IMAGES="/var/opt/opnfv/images" - BASE="/var/opt/opnfv" - LIB="/var/opt/opnfv/lib" + fi +done + +# Make sure jinja2 is installed +for python_pkg in jinja2; do + if ! python3.4 -c "import $python_pkg"; then + echo "$python_pkg package not found for python3.4, attempting to install..." + if ! sudo easy_install-3.4 $python_pkg; then + echo -e "Failed to install $python_pkg package for python3.4" + exit 1 + fi + fi +done + +if [[ "$JOB_NAME" =~ "virtual" ]]; then + # Make sure ipxe-roms-qemu package is updated to latest. + # This package is needed for multi virtio nic PXE boot in virtual environment. + sudo yum update -y ipxe-roms-qemu + if [ -z ${PYTHONPATH:-} ]; then + export PYTHONPATH=${WORKSPACE}/lib/python + else + export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python + fi fi # set env vars to deploy cmd @@ -165,8 +96,9 @@ if [ "$OPNFV_CLEAN" == 'yes' ]; then else clean_opts='' fi - if [[ "$BUILD_DIRECTORY" == *verify* || "$BUILD_DIRECTORY" == *promote* ]]; then - sudo BASE=${BASE} LIB=${LIB} ./clean.sh ${clean_opts} + + if [[ "$ARTIFACT_VERSION" =~ "dev" ]]; then + sudo CONFIG=${CONFIG} LIB=${LIB} ./clean.sh ${clean_opts} else sudo BASE=${BASE} LIB=${LIB} opnfv-clean ${clean_opts} fi @@ -185,7 +117,7 @@ if [ ! -e "$DEPLOY_FILE" ]; then echo "ERROR: Required settings file missing: Deploy settings file ${DEPLOY_FILE}" fi -if [[ "$JOB_NAME" == *virtual* ]]; then +if [[ "$JOB_NAME" =~ "virtual" ]]; then # settings for virtual deployment DEPLOY_CMD="${DEPLOY_CMD} -v" if [[ "${DEPLOY_SCENARIO}" =~ fdio|ovs ]]; then @@ -202,17 +134,6 @@ else NETWORK_SETTINGS_DIR="/root/network" INVENTORY_FILE="/root/inventory/pod_settings.yaml" -# (trozet) According to FDS folks uio_pci_generic works with UCS-B -# and there appears to be a bug with vfio-pci - # if fdio on baremetal, then we are using UCS enic and - # need to use vfio-pci instead of uio generic -# if [[ "$DEPLOY_SCENARIO" == *fdio* ]]; then -# TMP_DEPLOY_FILE="${WORKSPACE}/${DEPLOY_SCENARIO}.yaml" -# cp -f ${DEPLOY_FILE} ${TMP_DEPLOY_FILE} -# sed -i 's/^\(\s*uio-driver:\).*$/\1 vfio-pci/g' ${TMP_DEPLOY_FILE} -# DEPLOY_FILE=${TMP_DEPLOY_FILE} -# fi - if ! sudo test -e "$INVENTORY_FILE"; then echo "ERROR: Required settings file missing: Inventory settings file ${INVENTORY_FILE}" exit 1 diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh new file mode 100755 index 000000000..a921d61aa --- /dev/null +++ b/jjb/apex/apex-download-artifact.sh @@ -0,0 +1,71 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +APEX_PKGS="common undercloud" # removed onos for danube + +[[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY + +if [[ "$ARTIFACT_VERSION" =~ dev ]]; then + # dev build + export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}" + # get build artifact + pushd ${BUILD_DIRECTORY} > /dev/null + echo "Downloading packaged dev build..." + curl --fail -s -o $BUILD_DIRECTORY/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz http://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz + tar -xvf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz + popd > /dev/null +else + # Must be RPMs/ISO + export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") + + # get the properties file in order to get info regarding artifacts + curl --fail -s -o $BUILD_DIRECTORY/opnfv.properties http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties + + # source the file so we get OPNFV vars + source $BUILD_DIRECTORY/opnfv.properties + + RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//') + RPM_LIST=${RPM_INSTALL_PATH}/$(basename $OPNFV_RPM_URL) + + # 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]+)') + # build RPM List which already includes base Apex RPM + for pkg in ${APEX_PKGS}; do + RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm" + done + + # remove old / install new RPMs + if rpm -q opnfv-apex > /dev/null; then + INSTALLED_RPMS=$(rpm -qa | grep apex) + if [ -n "$INSTALLED_RPMS" ]; then + sudo yum remove -y ${INSTALLED_RPMS} + fi + fi + if ! sudo yum install -y $RPM_LIST; then + echo "Unable to install new RPMs: $RPM_LIST" + exit 1 + fi + + # log info to console + echo "Downloading the ISO artifact using URL http://$OPNFV_ARTIFACT_URL" + echo "--------------------------------------------------------" + echo + + # Download ISO + curl --fail -s -o $BUILD_DIRECTORY/apex.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 + +fi + +# TODO: Uncomment these lines to verify SHA512SUMs once the sums are +# fixed. +# echo "$OPNFV_ARTIFACT_SHA512SUM $BUILD_DIRECTORY/apex.iso" | sha512sum -c +# echo "$OPNFV_RPM_SHA512SUM $BUILD_DIRECTORY/$(basename $OPNFV_RPM_URL)" | sha512sum -c + +# list the files +ls -al $BUILD_DIRECTORY + +echo +echo "--------------------------------------------------------" +echo "Done!" diff --git a/jjb/apex/apex-jjb-renderer.py b/jjb/apex/apex-jjb-renderer.py new file mode 100644 index 000000000..da62bc7ad --- /dev/null +++ b/jjb/apex/apex-jjb-renderer.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2016 Tim Rozet (trozet@redhat.com) 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 +############################################################################## + +import pprint +import yaml +from jinja2 import Environment +from jinja2 import FileSystemLoader + +gspathname = dict() +branch = dict() +env = Environment(loader=FileSystemLoader('./'), autoescape=True) + +with open('scenarios.yaml.hidden') as _: + scenarios = yaml.safe_load(_) + +template = env.get_template('apex.yml.j2') + +print("Scenarios are: ") +pprint.pprint(scenarios) + +for stream in scenarios: + if stream == 'master': + gspathname['master'] = '' + branch[stream] = stream + else: + gspathname[stream] = '/' + stream + branch[stream] = 'stable/' + stream + +output = template.render(scenarios=scenarios, gspathname=gspathname, + branch=branch) + +with open('./apex.yml', 'w') as fh: + fh.write(output) diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh index 06c002319..3eb3cf23a 100644 --- a/jjb/apex/apex-snapshot-deploy.sh +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -129,6 +129,7 @@ if [ -z "$virsh_vm_defs" ]; then fi for node_def in ${virsh_vm_defs}; do + sed -ri "s/machine='[^\s]+'/machine='pc'/" ${node_def} sudo virsh define ${node_def} node=$(echo ${node_def} | awk -F '.' '{print $1}') sudo cp -f ${node}.qcow2 /var/lib/libvirt/images/ diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index d046c119d..96c22bfac 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -18,35 +18,37 @@ source $WORKSPACE/opnfv.properties BUILD_DIRECTORY=${WORKSPACE}/.build -# clone releng repository -echo "Cloning releng repository..." -[ -d releng ] && rm -rf releng -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 -fi +importkey () { + # clone releng repository + echo "Cloning releng repository..." + [ -d releng ] && rm -rf releng + 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 + fi +} signrpm () { -for artifact in $RPM_LIST $SRPM_LIST; do - echo "Signing artifact: ${artifact}" - gpg2 -vvv --batch --yes --no-tty \ - --default-key opnfv-helpdesk@rt.linuxfoundation.org \ - --passphrase besteffort \ - --detach-sig $artifact - gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig) - echo "Upload complete for ${artifact} signature" -done + for artifact in $RPM_LIST $SRPM_LIST; do + echo "Signing artifact: ${artifact}" + gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig $artifact + gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig) + echo "Upload complete for ${artifact} signature" + done } signiso () { -time gpg2 -vvv --batch --yes --no-tty \ - --default-key opnfv-helpdesk@rt.linuxfoundation.org \ - --passphrase besteffort \ - --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso + gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso -gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig -echo "ISO signature Upload Complete!" + gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig + echo "ISO signature Upload Complete!" } uploadiso () { @@ -62,6 +64,13 @@ uploadrpm () { done gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log + + # Make the property files viewable on the artifact site + gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://$GS_URL/latest.properties \ + gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1 } uploadsnap () { @@ -75,6 +84,20 @@ uploadsnap () { echo "Upload complete for Snapshot" } +uploadimages () { + # Uploads dev tarball + export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}" + echo "Uploading development build tarball" + pushd $BUILD_DIRECTORY > /dev/null + tar czf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz *.qcow2 + gsutil cp apex-${OPNFV_ARTIFACT_VERSION}.tar.gz gs://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz > gsutil.latest.log + popd > /dev/null +} + +# Always import the signing key, if it's available the artifacts will be +# signed before being uploaded +importkey + if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then echo "Signing Key avaliable" SIGN_ARTIFACT="true" @@ -83,28 +106,38 @@ fi if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then uploadsnap elif [ "$ARTIFACT_TYPE" == 'iso' ]; then + if [[ "$ARTIFACT_VERSION" =~ dev ]]; then + echo "Skipping artifact upload for ${ARTIFACT_TYPE} due to dev build" + exit 0 + fi if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then signiso fi uploadiso elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then - RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch - RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) - VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//') - for pkg in common undercloud; do # removed onos for danube - RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" - done - SRPM_INSTALL_PATH=$BUILD_DIRECTORY - SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) - VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//') - for pkg in common undercloud; do # removed onos for danube - SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" - done + if [[ "$ARTIFACT_VERSION" =~ dev ]]; then + echo "dev build detected, will upload image tarball" + ARTIFACT_TYPE=tarball + uploadimages + else + RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch + RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) + VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//') + for pkg in common undercloud; do # removed onos for danube + RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" + done + SRPM_INSTALL_PATH=$BUILD_DIRECTORY + SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) + VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//') + for pkg in common undercloud; do # removed onos for danube + SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" + done - if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then - signrpm + if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then + signrpm + fi + uploadrpm fi - uploadrpm else echo "ERROR: Unknown artifact type ${ARTIFACT_TYPE} to upload...exiting" exit 1 @@ -115,3 +148,4 @@ echo "--------------------------------------------------------" echo "Done!" if [ "$ARTIFACT_TYPE" == 'iso' ]; then echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"; fi if [ "$ARTIFACT_TYPE" == 'rpm' ]; then echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"; fi +if [ "$ARTIFACT_TYPE" == 'tarball' ]; then echo "Dev tarball Artifact is available as http://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz)"; fi diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 56eac78e6..699bdb3b8 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -1,65 +1,41 @@ - project: - name: apex + name: 'apex' + project: 'apex' + build-slave: 'apex-build' jobs: - 'apex-verify-{stream}' - 'apex-verify-gate-{stream}' - 'apex-verify-unit-tests-{stream}' - - 'apex-runner-{platform}-{scenario}-{stream}' - 'apex-runner-cperf-{stream}' - 'apex-build-{stream}' - - 'apex-deploy-virtual-{scenario}-{stream}' - - 'apex-deploy-baremetal-{scenario}-{stream}' - - 'apex-daily-{stream}' + - 'apex-deploy-{platform}-{stream}' + - 'apex-daily-master' + - 'apex-daily-danube' - 'apex-csit-promote-daily-{stream}' - 'apex-fdio-promote-daily-{stream}' - 'apex-verify-iso-{stream}' - + - 'apex-deploy-test-baremetal-{stream}' + - 'apex-upload-snapshot' + - 'apex-create-snapshot' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) stream: - master: branch: 'master' gs-pathname: '' - slave: 'lf-pod1' - verify-slave: 'apex-verify-master' - daily-slave: 'apex-daily-master' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + - danube: branch: 'stable/danube' gs-pathname: '/danube' - slave: 'lf-pod1' - verify-slave: 'apex-verify-danube' - daily-slave: 'apex-daily-danube' - - project: 'apex' - - scenario: - - 'os-nosdn-nofeature-noha' - - 'os-nosdn-nofeature-ha' - - 'os-nosdn-nofeature-ha-ipv6' - - 'os-nosdn-ovs-noha' - - 'os-nosdn-ovs-ha' - - 'os-nosdn-fdio-noha' - - 'os-nosdn-fdio-ha' - - 'os-nosdn-kvm-ha' - - 'os-nosdn-kvm-noha' - - 'os-odl_l2-fdio-noha' - - 'os-odl_l2-fdio-ha' - - 'os-odl_l2-netvirt_gbp_fdio-noha' - - 'os-odl_l2-sfc-noha' - - 'os-odl_l3-nofeature-noha' - - 'os-odl_l3-nofeature-ha' - - 'os-odl_l3-ovs-noha' - - 'os-odl_l3-ovs-ha' - - 'os-odl-bgpvpn-ha' - - 'os-odl-gluon-noha' - - 'os-odl_l3-fdio-noha' - - 'os-odl_l3-fdio-ha' - - 'os-odl_l3-fdio_dvr-noha' - - 'os-odl_l3-fdio_dvr-ha' - - 'os-odl_l3-csit-noha' - - 'os-onos-nofeature-ha' - - 'os-ovn-nofeature-noha' - - 'gate' + build-slave: 'apex-build-danube' + virtual-slave: 'apex-virtual-danube' + baremetal-slave: 'apex-baremetal-danube' + verify-scenario: 'os-odl_l3-nofeature-ha' + disabled: false platform: - 'baremetal' @@ -69,7 +45,7 @@ - job-template: name: 'apex-verify-unit-tests-{stream}' - node: '{verify-slave}' + node: '{build-slave}' concurrent: true @@ -79,10 +55,6 @@ - project-parameter: project: '{project}' branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." scm: - git-scm-gerrit @@ -117,27 +89,29 @@ option: 'project' builders: - - 'apex-unit-test' + - shell: + !include-raw-escape: ./apex-unit-test.sh # Verify - job-template: name: 'apex-verify-{stream}' - node: '{verify-slave}' + node: '{virtual-slave}' concurrent: true + project-type: 'multijob' + parameters: - apex-parameter: - gs-pathname: '{gs-pathname}' + gs-pathname: '{gs-pathname}/dev' - project-parameter: project: '{project}' branch: '{branch}' - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." - + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" scm: - git-scm-gerrit @@ -178,7 +152,6 @@ blocking-jobs: - 'apex-daily.*' - 'apex-deploy.*' - - 'apex-build.*' - 'apex-runner.*' - 'apex-verify.*' - throttle: @@ -187,36 +160,86 @@ option: 'project' builders: - - 'apex-unit-test' - - 'apex-build' - - trigger-builds: - - project: 'apex-deploy-virtual-os-odl_l3-nofeature-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-verify-{stream} - OPNFV_CLEAN=yes - git-revision: false - block: true - same-node: true - - trigger-builds: - - project: 'functest-apex-{verify-slave}-suite-{stream}' - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-nofeature-ha - FUNCTEST_SUITE_NAME=healthcheck - block: true - same-node: true - - 'apex-workspace-cleanup' + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'apex-verify-unit-tests-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + 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 + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false # Verify Scenario Gate - job-template: name: 'apex-verify-gate-{stream}' - node: '{verify-slave}' + node: '{virtual-slave}' concurrent: true + project-type: 'multijob' + parameters: - apex-parameter: - gs-pathname: '{gs-pathname}' + gs-pathname: '{gs-pathname}/dev' - project-parameter: project: '{project}' branch: '{branch}' @@ -267,88 +290,46 @@ option: 'project' builders: - - 'apex-build' - - trigger-builds: - - project: 'apex-deploy-virtual-gate-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-verify-gate-{stream} - OPNFV_CLEAN=yes - current-parameters: true - git-revision: false - block: true - same-node: true - - trigger-builds: - - project: 'functest-apex-{verify-slave}-suite-{stream}' - predefined-parameters: | - DEPLOY_SCENARIO=os-nosdn-nofeature-ha - FUNCTEST_SUITE_NAME=healthcheck - block: true - same-node: true - - 'apex-workspace-cleanup' - -- job-template: - name: 'apex-runner-{platform}-{scenario}-{stream}' - - # runner jobs for deploying manually - - node: '{slave}' - - disabled: false - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." - - scm: - - git-scm - - properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'apex-daily.*' - - 'apex-verify.*' - - 'apex-.*-promote.*' - - builders: - - trigger-builds: - - project: 'apex-deploy-{platform}-{scenario}-{stream}' - predefined-parameters: - OPNFV_CLEAN=yes - git-revision: false - block: true - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'functest-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=gate + 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 + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' # runner cperf job - + project-type: 'multijob' node: 'intel-pod2' disabled: false @@ -380,20 +361,35 @@ option: 'project' builders: - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-noha-{stream}' - predefined-parameters: - OPNFV_CLEAN=yes - git-revision: false - block: true - same-node: true - - trigger-builds: - - project: 'cperf-apex-intel-pod2-daily-master' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-nofeature-noha - block: true - same-node: true - + - description-setter: + description: "Deployed on $NODE_NAME" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: false + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +# Build phase - job-template: name: 'apex-build-{stream}' @@ -402,33 +398,25 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{daily-slave}' + node: '{build-slave}' disabled: false concurrent: true parameters: + - '{project}-defaults' - project-parameter: project: '{project}' branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." scm: - git-scm properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - throttle: max-per-node: 1 max-total: 10 @@ -436,27 +424,9 @@ builders: - 'apex-build' - - trigger-builds: - - project: 'apex-deploy-virtual-os-nosdn-nofeature-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: false - same-node: true - block: true - inject: properties-content: ARTIFACT_TYPE=rpm - 'apex-upload-artifact' - - trigger-builds: - - project: 'apex-verify-iso-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - git-revision: false - block: true - same-node: true - - inject: - properties-content: ARTIFACT_TYPE=iso - - 'apex-upload-artifact' # ISO verify job - job-template: @@ -467,7 +437,7 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{daily-slave}' + node: '{virtual-slave}' disabled: false @@ -501,16 +471,20 @@ builders: - 'apex-iso-verify' + - inject: + properties-content: ARTIFACT_TYPE=iso + - 'apex-upload-artifact' +# Deploy job - job-template: - name: 'apex-deploy-virtual-{scenario}-{stream}' + name: 'apex-deploy-{platform}-{stream}' # Job template for virtual deployment # # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{slave}' + node: 'apex-{platform}-{stream}' concurrent: true @@ -527,7 +501,7 @@ gs-pathname: '{gs-pathname}' - string: name: DEPLOY_SCENARIO - default: '{scenario}' + default: '{verify-scenario}' description: "Scenario to deploy with." - string: name: OPNFV_CLEAN @@ -547,18 +521,23 @@ option: 'project' builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'apex-download-artifact' - 'apex-deploy' - 'apex-workspace-cleanup' + +# Baremetal Deploy and Test - job-template: - name: 'apex-deploy-baremetal-{scenario}-{stream}' + name: 'apex-deploy-test-baremetal-{stream}' - # Job template for baremetal deployment + # Job template for daily build # # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{slave}' + project-type: 'multijob' disabled: false @@ -566,6 +545,8 @@ - git-scm parameters: + - '{project}-defaults' + - '{project}-baremetal-{stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -573,8 +554,85 @@ gs-pathname: '{gs-pathname}' - string: name: DEPLOY_SCENARIO - default: '{scenario}' + default: '{verify-scenario}' description: "Scenario to deploy with." + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + + +# danube Daily +- job-template: + name: 'apex-daily-danube' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + project-type: 'multijob' + + node: '{build-slave}' + + disabled: false + + scm: + - git-scm + + parameters: + - '{project}-defaults' + - '{project}-baremetal-danube-defaults' + - project-parameter: + project: '{project}' + branch: 'stable/danube' + - apex-parameter: + gs-pathname: '/danube' properties: - logrotate-default @@ -584,23 +642,322 @@ blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' - - 'apex-build.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + triggers: + - 'apex-danube' builders: - - 'apex-deploy' - - 'apex-workspace-cleanup' + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-danube' + 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: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: 'Verify and upload ISO' + condition: SUCCESSFUL + projects: + - name: 'apex-verify-iso-danube' + current-parameters: false + predefined-parameters: | + BUILD_DIRECTORY=apex-build-danube/.build + 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 + abort-all-job: true + git-revision: true + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: -# Daily + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-ha-ipv6 + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-ovs-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-ovs-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-fdio-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-fdio-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-kvm-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-kvm-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-fdio-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-fdio-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-sfc-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-ovs-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-ovs-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl-bgpvpn-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl-gluon-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-fdio-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-fdio-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-fdio_dvr-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-fdio_dvr-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-csit-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-onos-nofeature-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-danube' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-ovn-nofeature-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + +# master Daily - job-template: - name: 'apex-daily-{stream}' + name: 'apex-daily-master' # Job template for daily build # # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{daily-slave}' + project-type: 'multijob' + + node: '{build-slave}' disabled: false @@ -608,11 +965,13 @@ - git-scm parameters: + - '{project}-defaults' + - '{project}-baremetal-master-defaults' - project-parameter: project: '{project}' - branch: '{branch}' + branch: 'master' - apex-parameter: - gs-pathname: '{gs-pathname}' + gs-pathname: '' properties: - logrotate-default @@ -622,397 +981,121 @@ blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' - - 'apex-build.*' - 'apex-runner.*' - 'apex-.*-promote.*' triggers: - - 'apex-{stream}' + - 'apex-master' + + builders: + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-master' + 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: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: 'Verify and upload ISO' + condition: SUCCESSFUL + projects: + - name: 'apex-verify-iso-master' + current-parameters: false + predefined-parameters: | + BUILD_DIRECTORY=apex-build-master/.build + 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 + abort-all-job: true + git-revision: true + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + + - name: 'apex-deploy-test-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-nofeature-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl-nofeature-ha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + - name: 'apex-deploy-test-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl-nofeature-noha + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + + + +# snapshot create +- job-template: + name: 'apex-create-snapshot' + + # Job template for clean + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + + disabled: false builders: - - trigger-builds: - - project: 'apex-build-{stream}' - git-revision: true - current-parameters: true - same-node: true - block: true - - trigger-builds: - - project: 'apex-deploy-baremetal-os-nosdn-nofeature-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-nofeature-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-nofeature-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - # 1.dovetail only master by now, not sync with A/B/C branches - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only debug testsuite here(includes basic testcase, - # i.e. one tempest smoke ipv6, two vping from functest) - # 4.not used for release criteria or compliance, - # only to debug the dovetail tool bugs with apex - #- trigger-builds: - # - project: 'dovetail-apex-{slave}-proposed_tests-{stream}' - # current-parameters: false - # predefined-parameters: - # DEPLOY_SCENARIO=os-nosdn-nofeature-ha - # block: true - # same-node: true - # block-thresholds: - # build-step-failure-threshold: 'never' - # failure-threshold: 'never' - # unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-nofeature-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-nofeature-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl-bgpvpn-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl-bgpvpn-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl-bgpvpn-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl-gluon-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl-gluon-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl-gluon-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l2-fdio-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l2-fdio-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l2-fdio-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l2-fdio-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l2-fdio-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-nosdn-kvm-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-kvm-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-kvm-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l3-fdio-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-fdio-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-fdio-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-nosdn-fdio-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-fdio-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-fdio-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-nosdn-ovs-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-ovs-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-nosdn-ovs-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-odl_l3-ovs-ha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-ovs-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-odl_l3-ovs-ha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'apex-deploy-baremetal-os-ovn-nofeature-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes - git-revision: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - block: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-ovn-nofeature-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-apex-{slave}-daily-{stream}' - predefined-parameters: - DEPLOY_SCENARIO=os-ovn-nofeature-noha - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - shell: + !include-raw-escape: ./apex-snapshot-create.sh + +# snapshot upload +- job-template: + name: 'apex-upload-snapshot' + + # Job template for clean + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + + disabled: false + + builders: + - inject: + properties-content: ARTIFACT_TYPE=snapshot + - 'apex-upload-artifact' # CSIT promote - job-template: @@ -1023,8 +1106,8 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{daily-slave}' - + node: '{virtual-slave}' + project-type: 'multijob' disabled: false scm: @@ -1052,27 +1135,75 @@ - timed: '0 12 * * 0' builders: - - 'apex-build' - - trigger-builds: - - project: 'apex-deploy-virtual-os-odl_l3-csit-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-csit-promote-daily-{stream} - OPNFV_CLEAN=yes - git-revision: false - block: true - same-node: true - - trigger-builds: - - project: 'functest-apex-{daily-slave}-suite-{stream}' - predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l3-nofeature-noha - FUNCTEST_SUITE_NAME=tempest_smoke_serial - block: true - same-node: true - - shell: - !include-raw-escape: ./apex-snapshot-create.sh - - inject: - properties-content: ARTIFACT_TYPE=snapshot - - 'apex-upload-artifact' + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-csit-noha + 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 + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + FUNCTEST_SUITE_NAME=tempest_smoke_serial + 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 + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false # FDIO promote - job-template: @@ -1083,8 +1214,8 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: '{daily-slave}' - + node: '{virtual-slave}' + project-type: 'multijob' disabled: false scm: @@ -1109,20 +1240,58 @@ - 'apex-daily.*' builders: - - 'apex-build' - - trigger-builds: - - project: 'apex-deploy-virtual-os-odl_l2-fdio-noha-{stream}' - predefined-parameters: | - BUILD_DIRECTORY=apex-fdio-promote-daily-{stream} - OPNFV_CLEAN=yes - git-revision: false - block: true - same-node: true - - shell: - !include-raw-escape: ./apex-snapshot-create.sh - - inject: - properties-content: ARTIFACT_TYPE=snapshot - - 'apex-upload-artifact' + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + 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 + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false - job-template: name: 'apex-gs-clean-{stream}' @@ -1148,7 +1317,6 @@ triggers: - 'apex-gs-clean-{stream}' - ######################## # parameter macros ######################## @@ -1165,7 +1333,7 @@ description: "Artifact version type" - string: name: BUILD_DIRECTORY - default: $WORKSPACE/build + default: $WORKSPACE/.build description: "Directory where the build artifact will be located upon the completion of the build." - string: name: CACHE_DIRECTORY @@ -1181,7 +1349,7 @@ description: "Version directory where opnfv artifacts are stored in gs repository" - string: name: GS_URL - default: artifacts.opnfv.org/$PROJECT{gs-pathname} + default: $GS_BASE{gs-pathname} description: "URL to Google Storage." ######################## @@ -1219,6 +1387,12 @@ !include-raw: ./apex-upload-artifact.sh - builder: + name: 'apex-download-artifact' + builders: + - shell: + !include-raw: ./apex-download-artifact.sh + +- builder: name: 'apex-gs-cleanup' builders: - shell: @@ -1230,7 +1404,6 @@ - shell: !include-raw: ./apex-deploy.sh - ####################### # trigger macros ######################## @@ -1245,4 +1418,4 @@ - trigger: name: 'apex-gs-clean-{stream}' triggers: - - timed: '0 2 * * *' + - timed: '0 2 * * *'
\ No newline at end of file diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 new file mode 100644 index 000000000..ee69f33e1 --- /dev/null +++ b/jjb/apex/apex.yml.j2 @@ -0,0 +1,1052 @@ +- project: + name: 'apex' + project: 'apex' + build-slave: 'apex-build' + jobs: + - 'apex-verify-{stream}' + - 'apex-verify-gate-{stream}' + - 'apex-verify-unit-tests-{stream}' + - 'apex-runner-cperf-{stream}' + - 'apex-build-{stream}' + - 'apex-deploy-{platform}-{stream}' + - 'apex-daily-master' + - 'apex-daily-danube' + - 'apex-csit-promote-daily-{stream}' + - 'apex-fdio-promote-daily-{stream}' + - 'apex-verify-iso-{stream}' + - 'apex-deploy-test-baremetal-{stream}' + - 'apex-upload-snapshot' + - 'apex-create-snapshot' + # stream: branch with - in place of / (eg. stable-arno) + # branch: branch (eg. stable/arno) + stream: + - master: + branch: 'master' + gs-pathname: '' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + + - danube: + branch: 'stable/danube' + gs-pathname: '/danube' + build-slave: 'apex-build-danube' + virtual-slave: 'apex-virtual-danube' + baremetal-slave: 'apex-baremetal-danube' + verify-scenario: 'os-odl_l3-nofeature-ha' + disabled: false + + platform: + - 'baremetal' + - 'virtual' + +# Unit Test +- job-template: + name: 'apex-verify-unit-tests-{stream}' + + node: '{build-slave}' + + concurrent: true + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'tests/**' + properties: + - logrotate-default + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - shell: + !include-raw-escape: ./apex-unit-test.sh + +# Verify +- job-template: + name: 'apex-verify-{stream}' + + node: '{virtual-slave}' + + concurrent: true + + project-type: 'multijob' + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-verify.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'apex-verify-unit-tests-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + 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 + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +# Verify Scenario Gate +- job-template: + name: 'apex-verify-gate-{stream}' + + node: '{virtual-slave}' + + concurrent: true + + project-type: 'multijob' + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*' + projects: + - project-compare-type: 'ANT' + project-pattern: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-daily.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + - 'apex-verify.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=gate + 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 + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={verify-scenario} + FUNCTEST_SUITE_NAME=healthcheck + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +- job-template: + name: 'apex-runner-cperf-{stream}' + + # runner cperf job + project-type: 'multijob' + node: 'intel-pod2' + + disabled: false + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: false + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - description-setter: + description: "Deployed on $NODE_NAME" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: false + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={verify-scenario} + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +# Build phase +- job-template: + name: 'apex-build-{stream}' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{build-slave}' + + disabled: false + + concurrent: true + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + scm: + - git-scm + + properties: + - logrotate-default + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-build' + - inject: + properties-content: ARTIFACT_TYPE=rpm + - 'apex-upload-artifact' + +# ISO verify job +- job-template: + name: 'apex-verify-iso-{stream}' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{virtual-slave}' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-iso-verify' + - inject: + properties-content: ARTIFACT_TYPE=iso + - 'apex-upload-artifact' + +# Deploy job +- job-template: + name: 'apex-deploy-{platform}-{stream}' + + # Job template for virtual deployment + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-{platform}-{stream}' + + concurrent: true + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + - string: + name: OPNFV_CLEAN + default: 'no' + description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'apex-download-artifact' + - 'apex-deploy' + - 'apex-workspace-cleanup' + + +# Baremetal Deploy and Test +- job-template: + name: 'apex-deploy-test-baremetal-{stream}' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + project-type: 'multijob' + + disabled: false + + scm: + - git-scm + + parameters: + - '{project}-defaults' + - '{project}-baremetal-{stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: ALWAYS + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Functest + condition: ALWAYS + projects: + - name: 'functest-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +{% for stream in scenarios %} +# {{ stream }} Daily +- job-template: + name: 'apex-daily-{{ stream }}' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + project-type: 'multijob' + + node: '{build-slave}' + + disabled: false + + scm: + - git-scm + + parameters: + - '{project}-defaults' + - '{project}-baremetal-{{ stream }}-defaults' + - project-parameter: + project: '{project}' + branch: '{{ branch[stream] }}' + - apex-parameter: + gs-pathname: '{{ gspathname[stream] }}' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + + triggers: + - 'apex-{{ stream }}' + + builders: + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{{ 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: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: 'Verify and upload ISO' + condition: SUCCESSFUL + projects: + - name: 'apex-verify-iso-{{ stream }}' + current-parameters: false + predefined-parameters: | + BUILD_DIRECTORY=apex-build-{{ stream }}/.build + 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 + abort-all-job: true + git-revision: true + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: +{% for scenario in scenarios[stream] %} + - name: 'apex-deploy-test-baremetal-{{ stream }}' + node-parameters: false + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO={{scenario}} + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false +{% endfor %} +{% endfor %} + +# snapshot create +- job-template: + name: 'apex-create-snapshot' + + # Job template for clean + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + + disabled: false + + builders: + - shell: + !include-raw-escape: ./apex-snapshot-create.sh + +# snapshot upload +- job-template: + name: 'apex-upload-snapshot' + + # Job template for clean + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + + disabled: false + + builders: + - inject: + properties-content: ARTIFACT_TYPE=snapshot + - 'apex-upload-artifact' + +# CSIT promote +- job-template: + name: 'apex-csit-promote-daily-{stream}' + + # Job template for promoting CSIT Snapshots + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{virtual-slave}' + project-type: 'multijob' + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + - 'apex-daily.*' + + triggers: + - timed: '0 12 * * 0' + + builders: + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-csit-noha + 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 + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l3-nofeature-noha + FUNCTEST_SUITE_NAME=tempest_smoke_serial + 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 + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +# FDIO promote +- job-template: + name: 'apex-fdio-promote-daily-{stream}' + + # Job template for promoting CSIT Snapshots + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{virtual-slave}' + project-type: 'multijob' + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + - 'apex-daily.*' + + builders: + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{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: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + 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 + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: create snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: upload snapshot + condition: SUCCESSFUL + projects: + - name: 'apex-create-snapshot' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + +- job-template: + name: 'apex-gs-clean-{stream}' + + # Job template for clean + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + node: '{slave}' + + disabled: false + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + builders: + - 'apex-gs-clean' + + triggers: + - 'apex-gs-clean-{stream}' + +######################## +# parameter macros +######################## +- parameter: + name: apex-parameter + parameters: + - string: + name: ARTIFACT_NAME + default: 'latest' + description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact" + - string: + name: ARTIFACT_VERSION + default: 'daily' + description: "Artifact version type" + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/.build + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: CACHE_DIRECTORY + default: $HOME/opnfv/cache{gs-pathname} + description: "Directory where the cache to be used during the build is located." + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." + - string: + name: GS_PATHNAME + default: '{gs-pathname}' + description: "Version directory where opnfv artifacts are stored in gs repository" + - string: + name: GS_URL + default: $GS_BASE{gs-pathname} + description: "URL to Google Storage." + +######################## +# builder macros +######################## +- builder: + name: 'apex-unit-test' + builders: + - shell: + !include-raw: ./apex-unit-test.sh + +- builder: + name: 'apex-build' + builders: + - shell: + !include-raw: ./apex-build.sh + +- builder: + name: 'apex-workspace-cleanup' + builders: + - shell: + !include-raw: ./apex-workspace-cleanup.sh + +- builder: + name: 'apex-iso-verify' + builders: + - shell: + !include-raw: ./apex-iso-verify.sh + + +- builder: + name: 'apex-upload-artifact' + builders: + - shell: + !include-raw: ./apex-upload-artifact.sh + +- builder: + name: 'apex-download-artifact' + builders: + - shell: + !include-raw: ./apex-download-artifact.sh + +- builder: + name: 'apex-gs-cleanup' + builders: + - shell: + !include-raw: ./apex-gs-cleanup.sh + +- builder: + name: 'apex-deploy' + builders: + - shell: + !include-raw: ./apex-deploy.sh + +####################### +# trigger macros +######################## +- trigger: + name: 'apex-master' + triggers: + - timed: '0 3 1 1 7' +- trigger: + name: 'apex-danube' + triggers: + - timed: '0 12 * * *' +- trigger: + name: 'apex-gs-clean-{stream}' + triggers: + - timed: '0 2 * * *' diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden new file mode 100644 index 000000000..bff7d3b5a --- /dev/null +++ b/jjb/apex/scenarios.yaml.hidden @@ -0,0 +1,32 @@ +master: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' + - 'os-odl-nofeature-ha' + - 'os-odl-nofeature-noha' +danube: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' + - 'os-nosdn-nofeature-ha-ipv6' + - 'os-nosdn-ovs-noha' + - 'os-nosdn-ovs-ha' + - 'os-nosdn-fdio-noha' + - 'os-nosdn-fdio-ha' + - 'os-nosdn-kvm-ha' + - 'os-nosdn-kvm-noha' + - 'os-odl_l2-fdio-noha' + - 'os-odl_l2-fdio-ha' + - 'os-odl_l2-netvirt_gbp_fdio-noha' + - 'os-odl_l2-sfc-noha' + - 'os-odl_l3-nofeature-noha' + - 'os-odl_l3-nofeature-ha' + - 'os-odl_l3-ovs-noha' + - 'os-odl_l3-ovs-ha' + - 'os-odl-bgpvpn-ha' + - 'os-odl-gluon-noha' + - 'os-odl_l3-fdio-noha' + - 'os-odl_l3-fdio-ha' + - 'os-odl_l3-fdio_dvr-noha' + - 'os-odl_l3-fdio_dvr-ha' + - 'os-odl_l3-csit-noha' + - 'os-onos-nofeature-ha' + - 'os-ovn-nofeature-noha' diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index ff855c1e0..17d520419 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -56,8 +56,8 @@ slave-label: arm-pod3 installer: fuel <<: *danube - - arm-pod3-2: - slave-label: arm-pod3-2 + - arm-pod4: + slave-label: arm-pod4 installer: fuel <<: *danube - arm-virtual1: @@ -75,8 +75,8 @@ slave-label: arm-pod3 installer: fuel <<: *master - - arm-pod3-2: - slave-label: arm-pod3-2 + - arm-pod4: + slave-label: arm-pod4 installer: fuel <<: *master - arm-virtual1: @@ -590,61 +590,61 @@ # Enea Armband POD 3 Triggers running against master branch (aarch64 slave) #-------------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-2-master-trigger' + name: 'fuel-os-nosdn-nofeature-ha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l2-sfc-ha-arm-pod4-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-2-master-trigger' + name: 'fuel-os-odl_l2-sfc-noha-arm-pod4-master-trigger' triggers: - timed: '' #-------------------------------------------------------------------------- # Enea Armband POD 3 Triggers running against danube branch (aarch64 slave) #-------------------------------------------------------------------------- - trigger: - name: 'fuel-os-odl_l2-nofeature-ha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l2-nofeature-ha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-ha-arm-pod3-2-danube-trigger' + name: 'fuel-os-nosdn-nofeature-ha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-nofeature-noha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l2-nofeature-noha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-ha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l2-sfc-ha-arm-pod4-danube-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl_l2-sfc-noha-arm-pod3-2-danube-trigger' + name: 'fuel-os-odl_l2-sfc-noha-arm-pod4-danube-trigger' triggers: - timed: '' diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh index 2e5aa3924..e445e0850 100755 --- a/jjb/armband/armband-deploy.sh +++ b/jjb/armband/armband-deploy.sh @@ -33,10 +33,10 @@ fi # set deployment parameters export TMPDIR=${WORKSPACE}/tmpdir -# arm-pod3-2 is an aarch64 jenkins slave for the same POD as the +# arm-pod4 is an aarch64 jenkins slave for the same POD as the # x86 jenkins slave arm-pod3; therefore we use the same pod name # to deploy the pod from both jenkins slaves -if [[ "${NODE_NAME}" == "arm-pod3-2" ]]; then +if [[ "${NODE_NAME}" == "arm-pod4" ]]; then NODE_NAME="arm-pod3" fi diff --git a/jjb/daisy4nfv/daisy4nfv-build.sh b/jjb/daisy4nfv/daisy4nfv-build.sh index 375d80733..925f68e18 100755 --- a/jjb/daisy4nfv/daisy4nfv-build.sh +++ b/jjb/daisy4nfv/daisy4nfv-build.sh @@ -1,5 +1,9 @@ #!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + echo "--------------------------------------------------------" echo "This is diasy4nfv build job!" echo "--------------------------------------------------------" diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh index 1cc0443ad..a64c80e5c 100755 --- a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh +++ b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh @@ -57,12 +57,18 @@ fi # log info to console echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL" -echo "This could take some time..." +echo "This could take some time... Now the time is $(date -u)" echo "--------------------------------------------------------" echo # download the file -curl -L -s -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 +if [[ "$NODE_NAME" =~ (zte) ]] && [ -x "$(command -v aria2c)" ]; then + DOWNLOAD_CMD="aria2c -x 3 --allow-overwrite=true -d $WORKSPACE -o opnfv.bin" +else + DOWNLOAD_CMD="curl -L -s -o $WORKSPACE/opnfv.bin" +fi + +$DOWNLOAD_CMD http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 # list the file ls -al $WORKSPACE/opnfv.bin diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 4998278c8..682948d8b 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -142,6 +142,31 @@ SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *master + - zte-pod1: + slave-label: zte-pod1 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod2: + slave-label: zte-pod2 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod3: + slave-label: zte-pod3 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - zte-pod1: + slave-label: zte-pod1 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube + - zte-pod3: + slave-label: zte-pod3 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *danube #-------------------------------- testsuite: - 'debug' diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 5161a3c7c..3ad67b60d 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -32,10 +32,11 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR sudo iptables -I FORWARD -j RETURN fi +releng_repo=${WORKSPACE}/releng +[ -d ${releng_repo} ] && sudo rm -rf ${releng_repo} +git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null + if [[ ${INSTALLER_TYPE} != 'joid' ]]; then - releng_repo=${WORKSPACE}/releng - [ -d ${releng_repo} ] && sudo rm -rf ${releng_repo} - git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} fi @@ -47,16 +48,63 @@ else exit 1 fi +sudo pip install virtualenv + +cd ${releng_repo}/modules +sudo virtualenv venv +source venv/bin/activate +sudo pip install -e ./ >/dev/null +sudo pip install netaddr + +if [[ ${INSTALLER_TYPE} == compass ]]; then + options="-u root -p root" +elif [[ ${INSTALLER_TYPE} == fuel ]]; then + options="-u root -p r00tme" +else + echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." + echo "HA test cases may not run properly." +fi + +pod_file_dir="/home/opnfv/dovetail/userconfig" +if [ -d ${pod_file_dir} ]; then + sudo rm -rf ${pod_file_dir}/* +else + sudo mkdir -p ${pod_file_dir} +fi +cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml" +echo ${cmd} +${cmd} + +deactivate + +cd ${WORKSPACE} + +if [ -f ${pod_file_dir}/pod.yaml ]; then + echo "file ${pod_file_dir}/pod.yaml:" + cat ${pod_file_dir}/pod.yaml +else + echo "Error: There doesn't exist file ${pod_file_dir}/pod.yaml." + echo "HA test cases may not run properly." +fi + +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + +if [ "$INSTALLER_TYPE" == "fuel" ]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${pod_file_dir}/id_rsa +fi + opts="--privileged=true -id" results_envs="-v /var/run/docker.sock:/var/run/docker.sock \ -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results" openrc_volume="-v ${OPENRC}:${OPENRC}" +userconfig_volume="-v ${pod_file_dir}:${pod_file_dir}" # Pull the image with correct tag echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}" docker pull opnfv/dovetail:$DOCKER_TAG >$redirect -cmd="docker run ${opts} ${results_envs} ${openrc_volume} \ +cmd="docker run ${opts} ${results_envs} ${openrc_volume} ${userconfig_volume} \ ${sshkey} opnfv/dovetail:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 32abad624..2fa868779 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -73,8 +73,8 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-odl_l2-sfc-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-odl_l2-bgpvpn-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + # - 'os-odl_l2-bgpvpn-ha': + # auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-kvm-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-ovs-ha': @@ -112,6 +112,7 @@ jobs: - 'fuel-{scenario}-{pod}-daily-{stream}' - 'fuel-deploy-{pod}-daily-{stream}' + - 'fuel-os-odl_l2-bgpvpn-ha-{pod}-daily-{stream}' ######################## # job templates @@ -195,6 +196,103 @@ recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com - job-template: + name: 'fuel-os-odl_l2-bgpvpn-ha-{pod}-daily-{stream}' + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'fuel-os-.*?-{pod}-daily-.*' + - 'fuel-os-.*?-{pod}-weekly-.*' + block-level: 'NODE' + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: os-odl_l2-bgpvpn-ha' + + triggers: + - 'fuel-os-odl_l2-bgpvpn-ha-{pod}-daily-{stream}-trigger' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: "os-odl_l2-bgpvpn-ha" + - fuel-ci-parameter: + gs-pathname: '{gs-pathname}' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - trigger-builds: + - project: 'fuel-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + same-node: true + block: true + - trigger-builds: + - project: 'functest-fuel-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'yardstick-fuel-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + # 1.dovetail only master by now, not sync with A/B/C branches + # 2.here the stream means the SUT stream, dovetail stream is defined in its own job + # 3.only debug testsuite here(includes basic testcase, + # i.e. refstack ipv6 vpn test cases from functest, HA test case + # from yardstick) + # 4.not used for release criteria or compliance, + # only to debug the dovetail tool bugs with fuel bgpvpn scenario + - trigger-builds: + - project: 'dovetail-fuel-{pod}-proposed_tests-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + + publishers: + - email: + recipients: peter.barabas@ericsson.com fzhadaev@mirantis.com matthew.lijun@huawei.com + + +- job-template: name: 'fuel-deploy-{pod}-daily-{stream}' disabled: '{obj:disabled}' diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 80ca44b32..b180f591b 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -80,20 +80,20 @@ installer: compass <<: *danube # apex CI PODs - - apex-verify-master: - slave-label: '{pod}' + - virtual: + slave-label: apex-virtual-master installer: apex <<: *master - - apex-daily-master: - slave-label: '{pod}' + - baremetal: + slave-label: apex-baremetal-master installer: apex <<: *master - - apex-verify-danube: - slave-label: '{pod}' + - virtual: + slave-label: apex-virtual-danube installer: apex <<: *danube - - apex-daily-danube: - slave-label: '{pod}' + - baremetal: + slave-label: apex-baremetal-danube installer: apex <<: *danube # armband CI PODs @@ -158,7 +158,7 @@ slave-label: '{pod}' installer: fuel <<: *master - - arm-pod3-2: + - arm-pod4: slave-label: '{pod}' installer: fuel <<: *master @@ -194,7 +194,7 @@ slave-label: '{pod}' installer: fuel <<: *danube - - arm-pod3-2: + - arm-pod4: slave-label: '{pod}' installer: fuel <<: *danube @@ -302,6 +302,7 @@ - 'vims' - 'multisite' - 'parser' + - 'opera_vims' - string: name: TESTCASE_OPTIONS default: '' diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh index 893c428a2..869c3956c 100755 --- a/jjb/functest/functest-loop.sh +++ b/jjb/functest/functest-loop.sh @@ -1,15 +1,9 @@ #!/bin/bash set +e -branch=${GIT_BRANCH##*/} -[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" -if [[ "$BRANCH" =~ 'brahmaputra' ]]; then - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}" -elif [[ "$BRANCH" =~ 'colorado' ]]; then - cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" -else - cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" -fi + +cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" + container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index 05e3d5792..1acf0a2ad 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -70,6 +70,15 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" +if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-ha'* ]]; then + ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + openo_msb_port=${openo_msb_port:-80} + openo_msb_endpoint="$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ + 'mysql -ucompass -pcompass -Dcompass -e "select package_config from cluster;" \ + | sed s/,/\\n/g | grep openo_ip | cut -d \" -f 4'):$openo_msb_port" + + envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}" +fi volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" @@ -103,12 +112,8 @@ if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then echo "The container ${FUNCTEST_IMAGE} with ID=${container_id} has not been properly started. Exiting..." exit 1 fi -if [[ "$BRANCH" =~ 'brahmaputra' ]]; then - cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" -elif [[ "$BRANCH" =~ 'colorado' ]]; then - cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" -else - cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" -fi + +cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" + echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index fc89f143b..44666a7d1 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -4,11 +4,11 @@ # use of the new labels are in place ##################################################### - parameter: - name: 'apex-daily-master-defaults' + name: 'apex-baremetal-master-defaults' parameters: - label: name: SLAVE_LABEL - default: 'apex-daily-master' + default: 'apex-baremetal-master' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -25,11 +25,11 @@ default-slaves: - lf-pod1 - parameter: - name: 'apex-daily-danube-defaults' + name: 'apex-baremetal-danube-defaults' parameters: - label: name: SLAVE_LABEL - default: 'apex-daily-danube' + default: 'apex-baremetal-danube' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -46,11 +46,11 @@ default-slaves: - lf-pod1 - parameter: - name: 'apex-verify-master-defaults' + name: 'apex-virtual-master-defaults' parameters: - label: name: SLAVE_LABEL - default: 'apex-verify-master' + default: 'apex-virtual-master' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -63,19 +63,18 @@ name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 + - lf-virtual2 + - lf-virtual3 default-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 + - lf-virtual2 + - lf-virtual3 + - parameter: - name: 'apex-verify-danube-defaults' + name: 'apex-virtual-danube-defaults' parameters: - label: name: SLAVE_LABEL - default: 'apex-verify-danube' + default: 'apex-virtual-danube' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -88,13 +87,9 @@ name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 + - lf-pod3 default-slaves: - - intel-virtual3 - - intel-virtual4 - - intel-virtual5 + - lf-pod3 - parameter: name: 'lf-pod1-defaults' parameters: @@ -113,6 +108,24 @@ name: SSH_KEY default: /root/.ssh/id_rsa description: 'SSH key to use for Apex' +- parameter: + name: 'lf-pod3-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod3 + default-slaves: + - lf-pod3 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' ##################################################### # Parameters for CI baremetal PODs ##################################################### @@ -747,15 +760,15 @@ default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab description: 'Base URI to the configuration directory' - parameter: - name: 'arm-pod3-2-defaults' + name: 'arm-pod4-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - arm-pod3-2 + - arm-pod4 default-slaves: - - arm-pod3-2 + - arm-pod4 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT diff --git a/jjb/opera/opera-daily-jobs.yml b/jjb/opera/opera-daily-jobs.yml index 5d2cc03f3..596d3771f 100644 --- a/jjb/opera/opera-daily-jobs.yml +++ b/jjb/opera/opera-daily-jobs.yml @@ -6,30 +6,32 @@ ##################################### # branch definitions ##################################### - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + disabled: false ##################################### -# patch verification phases +# pod definitions ##################################### - phase: - - 'basic' - - 'deploy' + pod: + - virtual: + slave-label: 'huawei-virtual7' + os-version: 'xenial' + <<: *master ##################################### # jobs ##################################### jobs: - - 'opera-daily-{stream}' - - 'opera-daily-{phase}-{stream}' + - 'opera-{pod}-daily-{stream}' + ##################################### # job templates ##################################### - job-template: - name: 'opera-daily-{stream}' + name: 'opera-{pod}-daily-{stream}' project-type: multijob @@ -62,86 +64,35 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'huawei-virtual7-defaults' + - string: + name: DEPLOY_SCENARIO + default: os-nosdn-openo-ha + - '{slave-label}-defaults' builders: - description-setter: description: "Built on $NODE_NAME" - multijob: - name: basic + name: deploy condition: SUCCESSFUL projects: - - name: 'opera-daily-basic-{stream}' - current-parameters: true + - name: 'compass-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=os-nosdn-openo-ha + COMPASS_OS_VERSION=xenial node-parameters: true kill-phase-on: FAILURE abort-all-job: true - multijob: - name: deploy + name: functest condition: SUCCESSFUL projects: - - name: 'compass-deploy-virtual-daily-{stream}' + - name: 'functest-compass-{pod}-suite-{stream}' current-parameters: false predefined-parameters: | DEPLOY_SCENARIO=os-nosdn-openo-ha - COMPASS_OS_VERSION=xenial + FUNCTEST_SUITE_NAME=opera_vims node-parameters: true - kill-phase-on: FAILURE + kill-phase-on: NEVER abort-all-job: true -# - multijob: -# name: functest -# condition: SUCCESSFUL -# projects: -# - name: 'functest-compass-baremetal-suite-{stream}' -# current-parameters: false -# predefined-parameters: -# FUNCTEST_SUITE_NAME=opera -# node-parameters: true -# kill-phase-on: NEVER -# abort-all-job: true - -- job-template: - name: 'opera-daily-{phase}-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' - - scm: - - git-scm - - wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 120 - fail: true - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-daily-{phase}-macro' - -##################################### -# builder macros -##################################### -- builder: - name: 'opera-daily-basic-macro' - builders: - - shell: | - #!/bin/bash - echo "Hello world!" - -- builder: - name: 'opera-daily-deploy-macro' - builders: - - shell: | - #!/bin/bash - echo "Hello world!" - diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml index ba540ed76..417fc702c 100644 --- a/jjb/releng/opnfv-docker-arm.yml +++ b/jjb/releng/opnfv-docker-arm.yml @@ -18,6 +18,11 @@ receivers: > cristina.pauna@enea.com alexandru.avadanii@enea.com + dovetail-arm-receivers: &dovetail-arm-receivers + receivers: > + cristina.pauna@enea.com + alexandru.avadanii@enea.com + alexandru.nemes@enea.com other-receivers: &other-receivers receivers: '' @@ -26,6 +31,9 @@ - 'functest': <<: *master <<: *functest-arm-receivers + - 'dovetail': + <<: *master + <<: *dovetail-arm-receivers # projects with jobs for stable jobs: diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index 5d73a9d70..2aa52adc5 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -75,14 +75,11 @@ echo "Current branch: $BRANCH" if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" +elif [[ -n "${RELEASE_VERSION-}" ]]; then + DOCKER_TAG=${BRANCH##*/}.${RELEASE_VERSION} + # e.g. danube.1.0, danube.2.0, danube.3.0 else - if [[ -n "${RELEASE_VERSION-}" ]]; then - release=${BRANCH##*/} - DOCKER_TAG=${release}.${RELEASE_VERSION} - # e.g. colorado.1.0, colorado.2.0, colorado.3.0 - else - DOCKER_TAG="stable" - fi + DOCKER_TAG="stable" fi # Start the build @@ -90,6 +87,9 @@ echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" echo "--------------------------------------------------------" echo if [[ $DOCKER_REPO_NAME == *"dovetail"* ]]; then + if [[ -n "${RELEASE_VERSION-}" ]]; then + DOCKER_TAG=${RELEASE_VERSION} + fi cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG -f $DOCKERFILE ." else cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH diff --git a/jjb/securedlab/check-jinja2.sh b/jjb/securedlab/check-jinja2.sh new file mode 100755 index 000000000..57650ec28 --- /dev/null +++ b/jjb/securedlab/check-jinja2.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set +x +set -o errexit +for lab_configs in $(find labs/ -name 'pod.yaml'); do + while IFS= read -r jinja_templates; do + echo "./utils/generate_config.py -y $lab_configs -j $jinja_templates" + ./utils/generate_config.py -y $lab_configs -j $jinja_templates + done < <(find installers/ -name '*.j2') +done diff --git a/jjb/securedlab/check-jinja2.yml b/jjb/securedlab/check-jinja2.yml new file mode 100644 index 000000000..1e85536e7 --- /dev/null +++ b/jjb/securedlab/check-jinja2.yml @@ -0,0 +1,80 @@ +######################## +# Job configuration to validate jninja2 files +######################## +- project: + + name: validate-templates + + project: 'securedlab' + + jobs: + - 'validate-jinja2-templates-{stream}' + + stream: + - master: + branch: '{stream}' + disabled: false + - danube: + branch: 'stable/{stream}' + disabled: false + +######################## +# job templates +######################## + +- job-template: + name: 'validate-jinja2-templates-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - node: + name: SLAVE_NAME + description: Slave to execute jnija template test + default-slaves: + - lf-build1 + allowed-multiselect: true + ignore-offline-nodes: true + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'REG_EXP' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'utils/generate_config.yml' + - compare-type: ANT + pattern: '**/*.jinja2' + - compare-type: ANT + pattern: '**/*.yaml' + builders: + - check-jinja + +- builder: + name: check-jinja + builders: + - shell: + !include-raw-escape: ./check-jinja2.sh diff --git a/jjb/xci/bifrost-provision.sh b/jjb/xci/bifrost-provision.sh index 4724c2ee5..b37da9059 100755 --- a/jjb/xci/bifrost-provision.sh +++ b/jjb/xci/bifrost-provision.sh @@ -82,13 +82,13 @@ sudo -E ./scripts/destroy-env.sh # provision VMs for the flavor cd /opt/bifrost -sudo -E ./scripts/bifrost-provision.sh +./scripts/bifrost-provision.sh # list the provisioned VMs cd /opt/bifrost source env-vars ironic node-list -virsh list +sudo -H -E virsh list echo "OpenStack nodes are provisioned!" # here we have to do something in order to capture what was the working sha1 diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index f596d7527..18019a7cb 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -113,14 +113,14 @@ sudo /bin/cp -rf /opt/releng/prototypes/bifrost/* /opt/bifrost/ # cleanup remnants of previous deployment cd /opt/bifrost -sudo -E ./scripts/destroy-env.sh +sudo -H -E ./scripts/destroy-env.sh # provision 3 VMs; xcimaster, controller, and compute cd /opt/bifrost -sudo -E ./scripts/bifrost-provision.sh +./scripts/bifrost-provision.sh # list the provisioned VMs cd /opt/bifrost source env-vars ironic node-list -virsh list +sudo -H -E virsh list |