diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/apex/apex.yml | 174 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 193 | ||||
-rwxr-xr-x | jjb/armband/armband-deploy.sh | 79 | ||||
-rwxr-xr-x | jjb/armband/armband-download-artifact.sh | 66 | ||||
-rw-r--r-- | jjb/armband/armband-project-jobs.yml (renamed from jjb/armband/armband.yml) | 40 | ||||
-rwxr-xr-x | jjb/armband/build.sh (renamed from jjb/armband/armband-build.sh) | 0 | ||||
-rwxr-xr-x | jjb/armband/upload-artifacts.sh | 86 | ||||
-rw-r--r-- | jjb/bottlenecks/bottlenecks-ci-jobs.yml | 49 | ||||
-rwxr-xr-x | jjb/fuel/fuel-build.sh | 12 | ||||
-rw-r--r-- | jjb/fuel/fuel-ci-jobs.yml | 16 | ||||
-rwxr-xr-x | jjb/fuel/fuel-project-jobs.yml | 3 | ||||
-rw-r--r-- | jjb/functest/functest-ci-jobs.yml | 74 | ||||
-rw-r--r-- | jjb/joid/joid-deploy.sh | 2 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 8 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docker.yml | 4 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docs.yml | 4 | ||||
-rw-r--r-- | jjb/opnfv/slave-params.yml | 49 | ||||
-rw-r--r-- | jjb/ovsnfv/ovsnfv.yml | 14 | ||||
-rw-r--r-- | jjb/qtip/qtip-ci-jobs.yml | 20 | ||||
-rw-r--r-- | jjb/releng-defaults.yaml | 4 | ||||
-rw-r--r-- | jjb/releng-macros.yaml | 23 | ||||
-rw-r--r-- | jjb/yardstick/yardstick-ci-jobs.yml | 10 |
22 files changed, 785 insertions, 145 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index b48e81e8c..35a6bf730 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -216,15 +216,22 @@ - trigger-builds: - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream1}' predefined-parameters: | - BUILD_DIRECTORY=apex-verify-{stream1}/build_output + BUILD_DIRECTORY=apex-verify-{stream1} OPNFV_CLEAN=yes git-revision: false block: true +# - trigger-builds: +# - project: 'functest-apex-{slave}-suite-{stream1}' +# predefined-parameters: | +# DEPLOY_SCENARIO=os-nosdn-nofeature-ha +# FUNCTEST_SUITE_NAME=vping_userdata +# block: true - trigger-builds: - - project: 'functest-apex-{slave}-suite-{stream1}' + - project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream1}' predefined-parameters: | - DEPLOY_SCENARIO=os-nosdn-nofeature-ha - FUNCTEST_SUITE_NAME=vping_userdata + BUILD_DIRECTORY=apex-verify-{stream1} + OPNFV_CLEAN=yes + git-revision: false block: true - 'apex-workspace-cleanup' @@ -329,7 +336,7 @@ - trigger-builds: - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream}' predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/build_output + BUILD_DIRECTORY=apex-build-{stream}/build OPNFV_CLEAN=yes git-revision: false block: true @@ -429,7 +436,7 @@ # branch: branch (eg. stable) node: '{slave}' - disabled: false + disabled: true scm: - git-scm: @@ -605,7 +612,7 @@ - trigger-builds: - project: 'apex-deploy-virtual-nosdn-nofeature-ha-{stream1}' predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream1}/build_output + BUILD_DIRECTORY=apex-build-{stream1}/build OPNFV_CLEAN=yes git-revision: true block: true @@ -628,6 +635,30 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' +- 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}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + + builders: + - 'apex-gs-clean' + + triggers: + - 'apex-gs-clean-{stream}' + + ######################## # parameter macros ######################## @@ -644,7 +675,7 @@ description: "Artifact version type" - string: name: BUILD_DIRECTORY - default: $WORKSPACE/build_output + default: $WORKSPACE/build description: "Directory where the build artifact will be located upon the completion of the build." - string: name: CACHE_DIRECTORY @@ -708,7 +739,7 @@ # start the build cd $WORKSPACE/ci ./build.sh $BUILD_ARGS - RPM_VERSION=$(grep Version $BUILD_DIRECTORY/../build/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') + RPM_VERSION=$(grep Version: $BUILD_DIRECTORY/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') # list the contents of BUILD_OUTPUT directory ls -al $BUILD_DIRECTORY # save information regarding artifact into file @@ -717,10 +748,10 @@ echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" + echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)" echo "OPNFV_SRPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.src.rpm" echo "OPNFV_RPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.noarch.rpm" - echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)" + echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/noarch/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" ) > $WORKSPACE/opnfv.properties echo "--------------------------------------------------------" @@ -736,7 +767,7 @@ set -o pipefail # delete everything that is in $WORKSPACE - /bin/rm -rf $WORKSPACE + sudo /bin/rm -rf $WORKSPACE - builder: name: 'apex-upload-artifact' @@ -756,16 +787,17 @@ source $WORKSPACE/opnfv.properties # upload artifact and additional files to google storage - gsutil cp $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 - RPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_RPM_URL) - RPM_LIST=$RPM_INSTALL_PATH - for pkg in common undercloud opendaylight-sfc; do - RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}" + gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 + 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 opendaylight-sfc onos; do + RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" done - SRPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_SRPM_URL) - SRPM_LIST=$SRPM_INSTALL_PATH - for pkg in common undercloud opendaylight-sfc; do - SRPM_LIST+=" ${SRPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}" + SRPM_INSTALL_PATH=$BUILD_DIRECTORY + SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) + for pkg in common undercloud opendaylight-sfc onos; do + SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" done for artifact in $RPM_LIST $SRPM_LIST; do gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.iso.log 2>&1 @@ -780,6 +812,30 @@ echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)" - builder: + name: 'apex-gs-cleanup' + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + + # log info to console + echo "Cleaning Google Storage" + echo "-----------------------" + echo + + thirty_days_ago=$(date -d "30 days ago" +"%Y%m%d") + + for i in $(gsutil ls gs://$GS_URL/*201?*); do + filedate=$(date -d "$(echo $i | grep -Eo 201[0-9]-?[0-9][0-9]-?[0-9][0-9])" +"%Y%m%d") + if [ $filedate -lt $thirty_days_ago ]; then + # gsutil indicates what it is removing so no need for output here + gsutil rm $i + fi + done + +- builder: name: 'apex-deploy-virtual' builders: - shell: | @@ -801,7 +857,8 @@ elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then # if artifact name is passed the pull a # specific artifact from artifacts.opnfv.org - RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME + RPM_INSTALL_PATH=$GS_URL + RPM_LIST=$RPM_INSTALL_PATH/$ARTIFACT_NAME else if [[ $BUILD_DIRECTORY == *verify* ]]; then BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY @@ -815,7 +872,8 @@ # 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}/$(basename $OPNFV_RPM_URL) + RPM_INSTALL_PATH=${BUILD_DIRECTORY}/noarch + RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) else if [[ $BUILD_DIRECTORY == *verify* ]]; then echo "BUILD_DIRECTORY is from a verify job, so will not use latest from URL" @@ -832,7 +890,8 @@ [[ -f opnfv.properties ]] || exit 1 # source the file so we get OPNFV vars source opnfv.properties - RPM_INSTALL_PATH=$OPNFV_RPM_URL + RPM_INSTALL_PATH=$(echo $OPNFV_RPM_URL | sed 's/'"$(basename $OPNFV_RPM_URL)"'//') + RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) fi fi @@ -844,36 +903,75 @@ # use local build for verify if [[ $BUILD_DIRECTORY == *verify-master* ]]; then if [ ! -e "${WORKSPACE}/build/lib" ]; then ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib; fi - DEPLOY_CMD="./deploy.sh -c ${WORKSPACE}/build -r ${WORKSPACE}/build/images/" + DEPLOY_CMD="CONFIG=${WORKSPACE}/build RESOURCES=${WORKSPACE}/build/images/ ./deploy.sh -c ${WORKSPACE}/build -r ${WORKSPACE}/build/images/" DEPLOY_FILE="${WORKSPACE}/config/deploy/${DEPLOY_SCENARIO}.yaml" NETWORK_FILE="${WORKSPACE}/config/network/network_settings.yaml" + # Make sure python34 is installed + if ! rpm -q python34 > /dev/null; then + sudo yum install -y epel-release + if ! sudo yum install -y python34; then + echo "Failed to install python34" + exit 1 + fi + fi + if ! rpm -q python34-PyYAML > /dev/null; then + sudo yum install -y epel-release + if ! sudo yum install -y python34-PyYAML; then + echo "Failed to install python34-PyYAML" + exit 1 + fi + fi + if ! rpm -q python34-setuptools > /dev/null; then + if ! sudo yum install -y python34-setuptools; then + echo "Failed to install python34-setuptools" + exit 1 + fi + fi + if [ -z ${PYTHONPATH:-} ]; then + export PYTHONPATH=${WORKSPACE}/lib/python + else + export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python + fi else - RPM_LIST=$RPM_INSTALL_PATH - for pkg in common undercloud opendaylight-sfc; do - RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}" + VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | sed 's/opnfv-apex-//') + for pkg in common undercloud opendaylight-sfc onos; do + RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}" done # update / install the new rpm if rpm -q opnfv-apex > /dev/null; then - if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then - echo "RPM is already installed" - elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then - if ! sudo yum downgrade -y $RPM_LIST; then - sudo yum remove -y opnfv-undercloud opnfv-common - sudo yum downgrade -y $RPM_INSTALL_PATH + INSTALLED_RPMS=$(rpm -qa | grep apex) + for x in $INSTALLED_RPMS; do + INSTALLED_RPM_VER=$(echo $x | sed 's/opnfv-apex-//').rpm + # Does each RPM's version match the version required for deployment + if [ "$INSTALLED_RPM_VER" == "$VERSION_EXTENSION" ]; then + echo "RPM $x is already installed" + else + echo "RPM $x does not match $VERSION_EXTENSION" + echo "Will upgrade/downgrade RPMs..." + # Try to upgrade/downgrade RPMS + if sudo yum update -y $RPM_LIST | grep "does not update installed package"; then + if ! sudo yum downgrade -y $RPM_LIST; then + sudo yum remove -y opnfv-apex-undercloud opnfv-apex-common opnfv-apex-opendaylight-sfc opnfv-apex-onos + sudo yum downgrade -y $RPM_INSTALL_PATH + fi fi - fi + break + fi + done else sudo yum install -y $RPM_LIST; fi DEPLOY_CMD=opnfv-deploy DEPLOY_FILE="/etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml" NETWORK_FILE="/etc/opnfv-apex/network_settings.yaml" + export RESOURCES="/var/opt/opnfv/images" + export CONFIG="/var/opt/opnfv" fi if [ "$OPNFV_CLEAN" == 'yes' ]; then if [[ $BUILD_DIRECTORY == *verify-master* ]]; then - sudo ./clean.sh + sudo CONFIG=../lib ./clean.sh else sudo opnfv-clean fi @@ -990,3 +1088,7 @@ name: 'apex-brahmaputra' triggers: - timed: '0 3 * * *' +- trigger: + name: 'apex-gs-clean-{stream}' + triggers: + - timed: '0 2 * * *' diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml new file mode 100644 index 000000000..f9cb1e917 --- /dev/null +++ b/jjb/armband/armband-ci-jobs.yml @@ -0,0 +1,193 @@ +# jenkins job templates for Armband +- project: + name: 'armband-ci' + project: 'armband' + installer: 'fuel' + +#-------------------------------- +# BRANCH ANCHORS +#-------------------------------- + master: &master + stream: master + branch: '{stream}' + gs-pathname: '' + brahmaputra: &brahmaputra + stream: brahmaputra + branch: 'stable/{stream}' + gs-pathname: '/{stream}' +#-------------------------------- +# POD, INSTALLER, AND BRANCH MAPPING +#-------------------------------- +# brahmaputra +#-------------------------------- + pod: + - arm-pod1: + <<: *brahmaputra +#-------------------------------- +# master +#-------------------------------- +# No master deploys for now +# - arm-pod1: +# <<: *master +#-------------------------------- +# scenarios +#-------------------------------- + scenario: + # HA scenarios + - 'os-odl_l2-nofeature-ha': + auto-trigger-name: 'brahmaputra-trigger-daily-disabled' + + # NOHA scenarios + - 'os-odl_l2-nofeature-noha': + auto-trigger-name: 'brahmaputra-trigger-daily-disabled' + + jobs: + - 'armband-{scenario}-{pod}-daily-{stream}' + - 'armband-deploy-{pod}-daily-{stream}' + +######################## +# job templates +######################## +- job-template: + name: 'armband-{scenario}-{pod}-daily-{stream}' + + concurrent: false + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'armband-os-.*?-{pod}-daily-{stream}' + block-level: 'NODE' + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + + triggers: + - '{auto-trigger-name}' + + parameters: + - project-parameter: + project: '{project}' + - '{installer}-defaults' + - '{pod}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + - armband-ci-parameter: + gs-pathname: '{gs-pathname}' + + builders: + - trigger-builds: + - project: 'armband-deploy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + - trigger-builds: + - project: 'functest-{installer}-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + +- job-template: + name: 'armband-deploy-{pod}-daily-{stream}' + + concurrent: false + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'armband-deploy-{pod}-daily-{stream}' + - 'armband-deploy-generic-daily-.*' + block-level: 'NODE' + + parameters: + - project-parameter: + project: '{project}' + - '{installer}-defaults' + - '{pod}-defaults': + installer: '{installer}' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-nofeature-ha' + - armband-ci-parameter: + gs-pathname: '{gs-pathname}' + + scm: + - git-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + branch: '{branch}' + + wrappers: + - build-name: + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + + builders: + - shell: + !include-raw-escape: ./armband-download-artifact.sh + - shell: + !include-raw-escape: ./armband-deploy.sh + + publishers: + - email: + recipients: josep.puigdemont@enea.com armband@enea.com + +######################## +# parameter macros +######################## +- parameter: + name: armband-ci-parameter + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: CACHE_DIRECTORY + default: $HOME/opnfv/cache/$INSTALLER_TYPE + description: "Directory where the cache to be used during the build is located." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." + +######################## +# trigger macros +######################## +# CI PODs +#---------------------------------------------------------- +# Enea Armband POD 1 Triggers running against master branch +#---------------------------------------------------------- +# No triggers for master for now +- trigger: + name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-master-trigger' + triggers: + - timed: '' + +#--------------------------------------------------------------- +# Enea Armband POD 1 Triggers running against brahmaputra branch +#--------------------------------------------------------------- +- trigger: + name: 'armband-os-odl_l2-nofeature-ha-arm-pod1-brahmaputra-trigger' + triggers: + - timed: '0 6 * * *' diff --git a/jjb/armband/armband-deploy.sh b/jjb/armband/armband-deploy.sh new file mode 100755 index 000000000..222a388e6 --- /dev/null +++ b/jjb/armband/armband-deploy.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Ericsson AB and others. +# (c) 2016 Enea Software AB +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o errexit +set -o nounset +set -o pipefail + +# source the file so we get OPNFV vars +source latest.properties + +# echo the info about artifact that is used during the deployment +echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" + +if [[ "$JOB_NAME" =~ "merge" ]]; then + # set simplest scenario for virtual deploys to run for merges + DEPLOY_SCENARIO="os-nosdn-nofeature-ha" +else + # for none-merge deployments + # checkout the commit that was used for building the downloaded artifact + # to make sure the ISO and deployment mechanism uses same versions + echo "Checking out $OPNFV_GIT_SHA1" + git checkout $OPNFV_GIT_SHA1 --quiet +fi + +# set deployment parameters +export TMPDIR=$HOME/tmpdir +BRIDGE=${DEFAULT_BRIDGE:-pxebr} +LAB_NAME=${NODE_NAME/-*} +POD_NAME=${NODE_NAME/*-} + +# we currently support enea +if [[ ! "$LAB_NAME" =~ "enea" ]]; then + echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!" + exit 1 +else + echo "Using configuration for $LAB_NAME" +fi + +# create TMPDIR if it doesn't exist +mkdir -p $TMPDIR + +cd $WORKSPACE +if [[ $LAB_CONFIG_URL =~ ^git:// ]]; then + git clone --quiet --branch ${GIT_BRANCH##origin/} $LAB_CONFIG_URL lab-config + LAB_CONFIG_URL=file://${WORKSPACE}/lab-config +fi + +# construct the command +DEPLOY_COMMAND="$WORKSPACE/ci/deploy.sh -b ${LAB_CONFIG_URL} -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://$WORKSPACE/opnfv.iso -H -B $BRIDGE -S $TMPDIR" + +# log info to console +echo "Deployment parameters" +echo "--------------------------------------------------------" +echo "Scenario: $DEPLOY_SCENARIO" +echo "Lab: $LAB_NAME" +echo "POD: $POD_NAME" +echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" +echo +echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..." +echo "--------------------------------------------------------" +echo + +# start the deployment +echo "Issuing command" +echo "$DEPLOY_COMMAND" +echo + +$DEPLOY_COMMAND + +echo +echo "--------------------------------------------------------" +echo "Deployment is done successfully!" diff --git a/jjb/armband/armband-download-artifact.sh b/jjb/armband/armband-download-artifact.sh new file mode 100755 index 000000000..15ad67d6e --- /dev/null +++ b/jjb/armband/armband-download-artifact.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Ericsson AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o errexit +set -o pipefail + +if [[ "$JOB_NAME" =~ "merge" ]]; then + echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties" + # get the properties file for the Armband Fuel ISO built for a merged change + curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties +else + # get the latest.properties file in order to get info regarding latest artifact + echo "Downloading http://$GS_URL/latest.properties" + curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties +fi + +# check if we got the file +# FIXME: the file is created even if it didn't exist on the host +# We should check that the contents are sane +[[ -f latest.properties ]] || exit 1 + +# source the file so we get artifact metadata +source latest.properties + +# echo the info about artifact that is used during the deployment +OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/} +echo "Using $OPNFV_ARTIFACT for deployment" + +# using ISOs for verify & merge jobs from local storage will be enabled later +if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then + # check if we already have the ISO to avoid redownload + ISOSTORE="/iso_mount/opnfv_ci/${GIT_BRANCH##*/}" + if [[ -f "$ISOSTORE/$OPNFV_ARTIFACT" ]]; then + echo "ISO exists locally. Skipping the download and using the file from ISO store" + ln -s $ISOSTORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso + echo "--------------------------------------------------------" + echo + ls -al $WORKSPACE/opnfv.iso + echo + echo "--------------------------------------------------------" + echo "Done!" + exit 0 + fi +fi + +# log info to console +echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL" +echo "This could take some time..." +echo "--------------------------------------------------------" +echo + +# download the file +curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL + +# The file is always created, check that it is in fact an ISO image +[[ $(file $WORKSPACE/opnfv.iso) =~ ISO ]] + +echo +echo "--------------------------------------------------------" +echo "Done!" diff --git a/jjb/armband/armband.yml b/jjb/armband/armband-project-jobs.yml index 75c0e7a7b..b40949d27 100644 --- a/jjb/armband/armband.yml +++ b/jjb/armband/armband-project-jobs.yml @@ -9,6 +9,7 @@ jobs: - 'armband-verify-{stream}' + - 'armband-build-daily-{stream}' stream: - master: @@ -72,15 +73,11 @@ max-per-node: 1 parameters: - - project-parameters: + - project-parameter: project: '{project}' - 'arm-build1-defaults' - - choice: - name: FORCE_BUILD - choices: - - 'false' - - 'true' - description: 'Force build even if there are no changes in the armband repo. Default false' + - armband-project-parameter: + gs-pathname: '{gs-pathname}' scm: - git-scm: @@ -89,18 +86,41 @@ branch: '{branch}' triggers: - -pollscm: + - pollscm: cron: '0 H/4 * * *' wrappers: - -timeout: + - timeout: timeout: 360 fail: true builders: - shell: - !include-raw-escape: ./armband-build.sh + !include-raw-escape: ./build.sh + - shell: + !include-raw-escape: ./upload-artifacts.sh publishers: - email: recipients: josep.puigdemont@enea.com armband@enea.com + +######################## +# parameter macros +######################## +- parameter: + name: armband-project-parameter + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." + - choice: + name: FORCE_BUILD + choices: + - 'false' + - 'true' + description: 'Force build even if there are no changes in the armband repo. Default false' diff --git a/jjb/armband/armband-build.sh b/jjb/armband/build.sh index 81917f6de..81917f6de 100755 --- a/jjb/armband/armband-build.sh +++ b/jjb/armband/build.sh diff --git a/jjb/armband/upload-artifacts.sh b/jjb/armband/upload-artifacts.sh new file mode 100755 index 000000000..f4e84e9d2 --- /dev/null +++ b/jjb/armband/upload-artifacts.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Ericsson AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o pipefail + +# check if we built something +if [ -f $WORKSPACE/.noupload ]; then + echo "Nothing new to upload. Exiting." + /bin/rm -f $WORKSPACE/.noupload + exit 0 +fi + +# source the opnfv.properties to get ARTIFACT_VERSION +source $WORKSPACE/opnfv.properties + +# storing ISOs for verify & merge jobs will be done once we get the disk array +if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then + # store ISO locally on NFS first + ISOSTORE="/home/jenkins/opnfv/iso_store" + if [[ -d "$ISOSTORE" ]]; then + # remove all but most recent 3 ISOs first to keep iso_mount clean & tidy + cd $ISOSTORE + ls -tp | grep -v '/' | tail -n +4 | xargs -d '\n' /bin/rm -f -- + + # store ISO + echo "Storing latest ISO in local storage" + touch .storing + /bin/cp -f $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ + $ISOSTORE/opnfv-$OPNFV_ARTIFACT_VERSION.iso + rm .storing + fi +fi + +# log info to console +echo "Uploading armband artifacts. This could take some time..." +echo + +echo "Started at $(date)" +cd $WORKSPACE +# upload artifact and additional files to google storage +gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \ + gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 +gsutil cp $WORKSPACE/opnfv.properties \ + gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 +if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then + gsutil cp $WORKSPACE/opnfv.properties \ + gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 +elif [[ "$JOB_NAME" =~ "merge" ]]; then + echo "Uploaded Armband Fuel ISO for a merged change" +fi +echo "Ended at $(date)" + +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 + +gsutil -m setmeta \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 + +# disabled errexit due to gsutil setmeta complaints +# BadRequestException: 400 Invalid argument +# check if we uploaded the file successfully to see if things are fine +gsutil ls gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "Problem while uploading artifact!" + echo "Check log $WORKSPACE/gsutil.iso.log on the machine where this build is done." + exit 1 +fi + +echo "Done!" +echo +echo "--------------------------------------------------------" +echo +echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" +echo +echo "--------------------------------------------------------" +echo diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml index cd1d89a5c..1109d188e 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml @@ -23,7 +23,7 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' gs-packagepath: '/{stream}/{suite}' - docker-tag: 'brahmaputra' + docker-tag: 'stable' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- @@ -42,6 +42,9 @@ #-------------------------------- # master #-------------------------------- + - opnfv-jump-2: + installer: fuel + <<: *master - ericsson-pod1: installer: fuel <<: *master @@ -54,7 +57,7 @@ - intel-pod8: installer: compass <<: *master - - zte-build-1: + - zte-pod1: installer: fuel <<: *master - orange-pod2: @@ -114,7 +117,6 @@ builders: - 'bottlenecks-env-cleanup' - - 'bottlenecks-fetch-os-creds' - 'bottlenecks-run-suite' publishers: @@ -125,12 +127,6 @@ # builder macros ######################## - builder: - name: bottlenecks-fetch-os-creds - builders: - - shell: - !include-raw ../../utils/fetch_os_creds.sh - -- builder: name: bottlenecks-env-cleanup builders: - shell: | @@ -162,21 +158,36 @@ set -e [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" - echo "Bottlenecks: ${SUITE_NAME} running now..." + echo "Bottlenecks: to pull image opnfv/bottlenecks:${DOCKER_TAG}" + docker pull opnfv/bottlenecks:$DOCKER_TAG >${redirect} - # pull latest image - docker pull opnfv/bottlenecks:$DOCKER_TAG >$redirect - - # run tests by using docker - opts="--privileged=true --rm" + echo "Bottlenecks: docker start running" + opts="--privileged=true -id" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \ -e BOTTLENECKS_BRANCH=${BOTTLENECKS_BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \ -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL}" + cmd="sudo docker run ${opts} ${envs} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash" + echo "Bottlenecks: docker cmd running ${cmd}" + ${cmd} >${redirect} + + echo "Bottlenecks: obtain docker id" + container_id=$(docker ps | grep "opnfv/bottlenecks:${DOCKER_TAG}" | awk '{print $1}' | head -1) + if [ -z ${container_id} ]; then + echo "Cannot find opnfv/bottlenecks container ID ${container_id}. Please check if it exists." + docker ps -a + exit 1 + fi + + echo "Bottlenecks: to prepare openstack environment" + prepare_env="${REPO_DIR}/ci/prepare_env.sh" + echo "Bottlenecks: docker cmd running: ${prepare_env}" + sudo docker exec ${container_id} ${prepare_env} + + echo "Bottlenecks: to run testsuite ${SUITE_NAME}" run_testsuite="${REPO_DIR}/run_tests.sh -s ${SUITE_NAME}" - cmd="sudo docker run ${opts} ${envs} opnfv/bottlenecks ${run_testsuite}" - echo "Bottlenecks: docker cmd running: ${cmd}" - ${cmd} + echo "Bottlenecks: docker cmd running: ${run_testsuite}" + sudo docker exec ${container_id} ${run_testsuite} #################### # parameter macros @@ -239,7 +250,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'bottlenecks-params-zte-build-1' + name: 'bottlenecks-params-zte-pod1' parameters: - string: name: BOTTLENECKS_DB_TARGET diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index eaf1f83e7..95ebaa5a9 100755 --- a/jjb/fuel/fuel-build.sh +++ b/jjb/fuel/fuel-build.sh @@ -35,11 +35,13 @@ CURRENT_SHA1=$(git rev-parse HEAD) FORCE_BUILD=${FORCE_BUILD:-false} if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" && "$FORCE_BUILD" == "false" ]]; then - echo "An ISO has already been built for this commit" - echo " $LATEST_ISO_URL" - echo "Nothing new to build. Exiting." - touch $WORKSPACE/.noupload - exit 0 + echo "***************************************************" + echo " An ISO has already been built for this commit" + echo " $LATEST_ISO_URL" + echo "***************************************************" +# echo "Nothing new to build. Exiting." +# touch $WORKSPACE/.noupload +# exit 0 else echo "This commit has not been built yet or forced build! Proceeding with the build." /bin/rm -f $LATEST_ISO_PROPERTIES diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml index e1816b528..77b711e74 100644 --- a/jjb/fuel/fuel-ci-jobs.yml +++ b/jjb/fuel/fuel-ci-jobs.yml @@ -278,35 +278,35 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 12 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 15 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 18 * * *' + - timed: '' - trigger: name: 'fuel-os-onos-nofeature-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 21 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 0 * * *' + - timed: '' - trigger: name: 'fuel-os-odl_l2-sfc-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 3 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 6 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-ovs-ha-ericsson-pod2-brahmaputra-trigger' triggers: - - timed: '0 9 * * *' + - timed: '' - trigger: name: 'fuel-os-nosdn-kvm-noha-ericsson-pod2-brahmaputra-trigger' triggers: diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index 0d768203f..f377c9bed 100755 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -60,8 +60,7 @@ branch: '{branch}' triggers: - - pollscm: - cron: '0 H/4 * * *' + - timed: '0 H/4 * * *' wrappers: - timeout: diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index e2b9a1049..bbdba9fa3 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -18,7 +18,7 @@ stream: brahmaputra branch: 'stable/{stream}' gs-pathname: '/{stream}' - docker-tag: 'brahmaputra.1.0' + docker-tag: 'stable' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- @@ -55,6 +55,9 @@ - virtual: installer: joid <<: *brahmaputra + - arm-pod1: + installer: fuel + <<: *brahmaputra #-------------------------------- # master #-------------------------------- @@ -94,6 +97,9 @@ - nokia-pod1: installer: apex <<: *master + - arm-pod1: + installer: fuel + <<: *master #-------------------------------- testsuite: @@ -191,7 +197,7 @@ description: "Push the results of all the tests to the resultDB" - string: name: CI_DEBUG - default: 'false' + default: 'true' description: "Show debug output information" ######################## # trigger macros @@ -217,11 +223,14 @@ builders: - shell: | #!/bin/bash - set +e - flags="-s" - [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r" - echo "Functest: run $FUNCTEST_SUITE_NAME" - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flags}" + set -e + branch=${GIT_BRANCH##*/} + echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}" + if [[ ${branch} == *"brahmaputra"* ]]; then + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME" + else + cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME" + fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -231,9 +240,13 @@ - shell: | #!/bin/bash set +e - flags="-s" - [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+=" -r" - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flags}" + branch=${GIT_BRANCH##*/} + [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" + if [[ ${branch} == *"brahmaputra"* ]]; then + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}" + else + cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" + fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -242,17 +255,29 @@ builders: - shell: | #!/bin/bash - set +e + set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" # labconfig is used only for joid labconfig="" if [[ ${INSTALLER_TYPE} == 'apex' ]]; then - instack_mac=$(sudo virsh domiflist instack | grep default | \ - grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + if sudo virsh list | grep instack; then + instack_mac=$(sudo virsh domiflist instack | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + elif sudo virsh list | grep undercloud; then + instack_mac=$(sudo virsh domiflist undercloud | grep default | \ + grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") + else + echo "No available installer VM exists...exiting" + exit 1 + fi INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'}) sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" - sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable - sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable + if sudo iptables -C FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then + sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable + fi + if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then + sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable + fi elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then # If production lab then creds may be retrieved dynamically # creds are on the jumphost, always in the same folder @@ -269,14 +294,15 @@ mkdir -p ${dir_result} sudo rm -rf ${dir_result}/* res_volume="-v ${dir_result}:/home/opnfv/functest/results" + custom_params= + test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}) echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}" - docker pull opnfv/functest:$DOCKER_TAG >${redirect} + docker pull opnfv/functest:$DOCKER_TAG >/dev/null - cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} opnfv/functest:${DOCKER_TAG} /bin/bash" + cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} opnfv/functest:${DOCKER_TAG} /bin/bash" echo "Functest: Running docker run command: ${cmd}" ${cmd} >${redirect} - docker ps -a sleep 5 container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1) echo "Container ID=${container_id}" @@ -288,12 +314,16 @@ echo "Starting the container: docker start ${container_id}" docker start ${container_id} sleep 5 - docker ps + docker ps >${redirect} if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." exit 1 fi - cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" + if [[ ${branch} == *"brahmaputra"* ]]; then + cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" + else + cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" + fi echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} @@ -320,10 +350,10 @@ # Remove existing images if exist if [[ ! -z $(docker images | grep opnfv/functest) ]]; then echo "Docker images to remove:" - docker images | head -1 && docker images | grep opnfv/functest + docker images | head -1 && docker images | grep opnfv/functest >${redirect} image_tags=($(docker images | grep opnfv/functest | awk '{print $2}')) for tag in "${image_tags[@]}"; do echo "Removing docker image opnfv/functest:$tag..." - docker rmi opnfv/functest:$tag >${redirect} + docker rmi opnfv/functest:$tag >/dev/null done fi diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh index 59ba01588..149447733 100644 --- a/jjb/joid/joid-deploy.sh +++ b/jjb/joid/joid-deploy.sh @@ -50,8 +50,6 @@ fi case $NODE_NAME in orange-fr-pod2) POD=orange-pod2 ;; - juniper-us-test-1) - POD=juniper-pod1 ;; *virtual*) POD=default ;; *) diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index 8f44268e6..702c0ce52 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -17,6 +17,14 @@ echo "--------------------------------------------------------" echo +if [[ -n $(ps -ef|grep 'docker build'|grep -v grep) ]]; then + echo "There is already another build process in progress:" + echo $(ps -ef|grep 'docker build'|grep -v grep) + # Abort this job since it will colide and might mess up the current one. + echo "Aborting..." + exit 1 +fi + # Remove previous running containers if exist if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then echo "Removing existing $DOCKER_REPO_NAME containers..." diff --git a/jjb/opnfv/opnfv-docker.yml b/jjb/opnfv/opnfv-docker.yml index 130edd480..936f22040 100644 --- a/jjb/opnfv/opnfv-docker.yml +++ b/jjb/opnfv/opnfv-docker.yml @@ -40,7 +40,7 @@ description: "To enable/disable pushing the image to Dockerhub." - string: name: BASE_VERSION - default: "brahmaputra.1" + default: "brahmaputra.3" description: "Base version to be used." - string: name: DOCKER_REPO_NAME @@ -83,7 +83,7 @@ description: "To enable/disable pushing the image to Dockerhub." - string: name: BASE_VERSION - default: "brahmaputra.2" + default: "brahmaputra.3" description: "Base version to be used." - string: name: DOCKER_REPO_NAME diff --git a/jjb/opnfv/opnfv-docs.yml b/jjb/opnfv/opnfv-docs.yml index e5c87a64d..2b3f98a4e 100644 --- a/jjb/opnfv/opnfv-docs.yml +++ b/jjb/opnfv/opnfv-docs.yml @@ -53,7 +53,7 @@ projects: - project-compare-type: 'REG_EXP' #Left out arno projects oscar|octopus|functest|genesis - project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models|domino|netready' + project-pattern: 'vswitchperf|apex|armband|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models|domino|netready' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' @@ -91,7 +91,7 @@ comment-contains-value: 'remerge' projects: - project-compare-type: 'REG_EXP' - project-pattern: 'vswitchperf|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models|domino|netready' + project-pattern: 'vswitchperf|apex|armband|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|octopus|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|cperf|functest|genesisreq|models|domino|netready' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml index 2431ade85..c45ac7b2d 100644 --- a/jjb/opnfv/slave-params.yml +++ b/jjb/opnfv/slave-params.yml @@ -394,15 +394,15 @@ description: 'Git URL to use on this Jenkins Slave' - parameter: - name: 'zte-build-1-defaults' + name: 'zte-pod1-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - zte-build-1 + - zte-pod1 default-slaves: - - zte-build-1 + - zte-pod1 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -415,9 +415,9 @@ name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - juniper-us-test-1 + - juniper-pod1 default-slaves: - - juniper-us-test-1 + - juniper-pod1 - string: name: INSTALLER_VERSION default: latest @@ -523,15 +523,15 @@ description: 'SSH key to use for Apex' - parameter: - name: 'dell-us-testing-bm-1-defaults' + name: 'dell-pod1-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - dell-us-testing-bm-1 + - dell-pod1 default-slaves: - - dell-us-testing-bm-1 + - dell-pod1 - string: name: INSTALLER_VERSION default: latest @@ -542,15 +542,15 @@ description: 'Git URL to use on this Jenkins Slave' - parameter: - name: 'dell-us-deploying-bm3-defaults' + name: 'dell-pod2-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - dell-us-deploying-bm3 + - dell-pod2 default-slaves: - - dell-us-deploying-bm3 + - dell-pod2 - string: name: INSTALLER_VERSION default: latest @@ -597,3 +597,30 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' + +- parameter: + name: 'arm-pod1-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - arm-pod1 + default-slaves: + - arm-pod1 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: DEFAULT_BRIDGE + default: 'admin6_br0,public6_br0' + desciption: 'The bridge to use for Fuel PXE booting. It can be a comma sparated list of bridges, in which case the first is the PXE boot bridge, and all subsequent interfaces that will be added to the VM. If left empty, most deploy scripts will default to pxebr.' + - string: + name: DEPLOY_TIMEOUT + default: '360' + description: 'Deployment timeout in minutes' + - string: + name: LAB_CONFIG_URL + default: file://$HOME/opnfv/repos/lab-config + description: 'Base URI to the configuration directory' diff --git a/jjb/ovsnfv/ovsnfv.yml b/jjb/ovsnfv/ovsnfv.yml index 8a119d9fb..6f6d29012 100644 --- a/jjb/ovsnfv/ovsnfv.yml +++ b/jjb/ovsnfv/ovsnfv.yml @@ -85,6 +85,11 @@ refspec: '' choosing-strategy: 'default' + wrappers: + - timeout: + timeout: 24 + fail: true + triggers: - gerrit: trigger-on: @@ -126,6 +131,11 @@ refspec: '' branch: '{branch}' + wrappers: + - timeout: + timeout: 24 + fail: true + triggers: - timed: '@midnight' @@ -138,3 +148,7 @@ cd $WORKSPACE/ci ./build.sh + + publishers: + - email: + recipients: therbert@redhat.com mark.d.gray@intel.com billy.o.mahony@intel.com diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml index 8dd0a4af0..5d4eeac8b 100644 --- a/jjb/qtip/qtip-ci-jobs.yml +++ b/jjb/qtip/qtip-ci-jobs.yml @@ -23,19 +23,14 @@ # brahmaputra #-------------------------------- pod: - - dell-us-testing-bm-1: + - dell-pod1: installer: compass - auto-trigger-name: 'qtip-daily-dell-us-testing-bm-1-trigger' + auto-trigger-name: 'qtip-daily-dell-pod1-trigger' <<: *brahmaputra - orange-pod2: installer: joid auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *brahmaputra - - dell-us-deploying-bm3: - installer: fuel - auto-trigger-name: 'qtip-daily-dell-us-deploying-bm3-trigger' - <<: *brahmaputra - #-------------------------------- # master #-------------------------------- @@ -43,7 +38,7 @@ installer: joid <<: *master auto-trigger-name: 'brahmaputra-trigger-daily-disabled' -# - zte-build-1: #would be confirmed with the ZTE lab by tomorrow +# - zte-pod1: #would be confirmed with the ZTE lab by tomorrow # installer: fuel # <<: *master @@ -171,17 +166,12 @@ ################# - trigger: - name: 'qtip-daily-dell-us-deploying-bm3-trigger' - triggers: - - timed: '0 0 * * *' - -- trigger: - name: 'qtip-daily-dell-us-testing-bm-1-trigger' + name: 'qtip-daily-dell-pod1-trigger' triggers: - timed: '0 3 * * *' #- trigger: -# name: 'qtip-daily-juniper-build1-trigger' +# name: 'qtip-daily-juniper-pod1-trigger' # triggers: # - timed : '0 0 * * *' diff --git a/jjb/releng-defaults.yaml b/jjb/releng-defaults.yaml index 2b927d270..bf3330657 100644 --- a/jjb/releng-defaults.yaml +++ b/jjb/releng-defaults.yaml @@ -4,8 +4,8 @@ name: global logrotate: - daysToKeep: 30 - numToKeep: 100 + daysToKeep: 60 + numToKeep: 200 artifactDaysToKeep: 30 artifactNumToKeep: 100 diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index 23d174a26..7fb4d653d 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -339,11 +339,27 @@ # generate and upload lint log echo "Running flake8 code on $PROJECT ..." - echo -e "Flake8 Violations\n-----------------" >> lint.log - find . \ + # Get number of flake8 violations. If none, this will be an + # empty string: "" + FLAKE_COUNT="$(find . \ -path './releng_flake8' -prune -o \ -type f -name "*.py" -print | \ - xargs flake8 --exit-zero --first >> lint.log + xargs flake8 --exit-zero -qq --count 2>&1)" + + if [ ! -z $FLAKE_COUNT ]; then + echo "Flake8 Violations: $FLAKE_COUNT" >> lint.log + find . \ + -path './releng_flake8' -prune -o \ + -type f -name "*.py" -print | \ + xargs flake8 --exit-zero --first >> violation.log + SHOWN=$(wc -l violation.log | cut -d' ' -f1) + echo -e "First $SHOWN shown\n---" >> lint.log + cat violation.log >> lint.log + sed -r -i '4,$s/^/ /g' lint.log + rm violation.log + else + echo -e "Flake8 Violations: 0" > lint.log + fi deactivate @@ -357,7 +373,6 @@ set -o xtrace export PATH=$PATH:/usr/local/bin/ if [[ -e lint.log ]] ; then - sed -r -i 's/^/ /g' lint.log echo -e "\nposting linting report to gerrit...\n" cat lint.log echo diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 57aa29c54..82b1a2367 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -108,10 +108,10 @@ suite: daily auto-trigger-name: 'brahmaputra-trigger-daily-disabled' <<: *master - - zte-build-1: + - zte-pod1: installer: fuel suite: daily - auto-trigger-name: 'yardstick-daily-zte-build-1-trigger' + auto-trigger-name: 'yardstick-daily-zte-pod1-trigger' <<: *master - orange-pod2: installer: joid @@ -387,7 +387,7 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: - name: 'yardstick-params-zte-build-1' + name: 'yardstick-params-zte-pod1' parameters: - string: name: YARDSTICK_DB_BACKEND @@ -439,7 +439,7 @@ ####################### # trigger for PODs to only run yardstick test suites - trigger: - name: 'yardstick-daily-zte-build-1-trigger' + name: 'yardstick-daily-zte-pod1-trigger' triggers: - timed: '0 2 * * *' @@ -456,4 +456,4 @@ - trigger: name: 'yardstick-daily-huawei-sh-pod6-trigger' triggers: - - timed: '0 1 * * *'
\ No newline at end of file + - timed: '0 1 * * *' |