diff options
Diffstat (limited to 'jjb')
-rwxr-xr-x | jjb/apex/apex-deploy.sh | 14 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 31 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 18 | ||||
-rw-r--r-- | jjb/bottlenecks/bottlenecks-ci-jobs.yml | 2 | ||||
-rw-r--r-- | jjb/bottlenecks/bottlenecks-cleanup.sh | 127 | ||||
-rw-r--r-- | jjb/bottlenecks/bottlenecks-run-suite.sh | 2 | ||||
-rw-r--r-- | jjb/bottlenecks/docker_cleanup.sh | 106 | ||||
-rw-r--r-- | jjb/dovetail/dovetail-ci-jobs.yml | 7 | ||||
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 8 | ||||
-rw-r--r-- | jjb/dovetail/dovetail-weekly-jobs.yml | 3 | ||||
-rw-r--r-- | jjb/global/releng-macros.yml | 8 | ||||
-rw-r--r-- | jjb/kvmfornfv/kvmfornfv.yml | 2 | ||||
-rw-r--r-- | jjb/xci/bifrost-cleanup-job.yml | 13 | ||||
-rw-r--r-- | jjb/xci/bifrost-verify-jobs.yml | 13 |
14 files changed, 206 insertions, 148 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 564c9cdb8..6343b838b 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -196,14 +196,16 @@ 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 [[ "$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}" diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index bb6e234fd..e7982ba55 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -57,6 +57,7 @@ - 'os-odl_l3-fdio_dvr-ha' - 'os-odl_l3-csit-noha' - 'os-onos-nofeature-ha' + - 'os-ovn-nofeature-noha' - 'gate' platform: @@ -925,6 +926,36 @@ 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' # CSIT promote - job-template: diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index ddcbbd038..38a729de6 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -290,11 +290,11 @@ - trigger: name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 6' + - timed: '0 0,20 * * 6' - trigger: name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 7' + - timed: '0 0,20 * * 7' #---------------------------------------------------------------------- # Enea Armband CI Baremetal Triggers running against danube branch @@ -302,31 +302,31 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8 * * 1,4' + - timed: '0 4 * * 1,2,3,4,5' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 1,4' + - timed: '0 8 * * 1,2,3,4,5' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8 * * 2,5' + - timed: '0 12 * * 1,2,3,4,5' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 2,5' + - timed: '0 16 * * 1,2,3,4,5' - trigger: name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8 * * 3,6' + - timed: '0 20 * * 1,2,3,4,5' - trigger: name: 'fuel-os-odl_l2-sfc-ha-armband-baremetal-danube-trigger' triggers: - - timed: '0 16 * * 3,6' + - timed: '0 4,8 * * 6,7' - trigger: name: 'fuel-os-odl_l2-sfc-noha-armband-baremetal-danube-trigger' triggers: - - timed: '0 8,16 * * 7' + - timed: '0 12,16 * * 6,7' #--------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch #--------------------------------------------------------------- diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml index 2779e316b..c56ca19e9 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml @@ -110,7 +110,7 @@ default: 'os-odl_l2-nofeature-ha' - string: name: GERRIT_REFSPEC_DEBUG - default: 'false' + default: 'true' description: "Gerrit refspec for debug." - string: name: SUITE_NAME diff --git a/jjb/bottlenecks/bottlenecks-cleanup.sh b/jjb/bottlenecks/bottlenecks-cleanup.sh index 0ba042318..052f72eef 100644 --- a/jjb/bottlenecks/bottlenecks-cleanup.sh +++ b/jjb/bottlenecks/bottlenecks-cleanup.sh @@ -1,111 +1,18 @@ #!/bin/bash -set -e -[[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" - -BOTTLENECKS_IMAGE=opnfv/bottlenecks -echo "Bottlenecks: docker containers/images cleaning up" - -dangling_images=($(docker images -f "dangling=true" | grep $BOTTLENECKS_IMAGE | awk '{print $3}')) -if [[ -n $dangling_images ]]; then - echo "Removing $BOTTLENECKS_IMAGE:<none> dangling images and their containers" - docker images | head -1 && docker images | grep $dangling_images - for image_id in "${dangling_images[@]}"; do - echo "Bottlenecks: Removing dangling image $image_id" - docker rmi -f $image_id >${redirect} - done -fi - -for image_id in "${dangling_images[@]}"; do - if [[ -n $(docker ps -a | grep $image_id) ]]; then - echo "Bottlenecks: Removing containers associated with dangling image: $image_id" - docker ps -a | head -1 && docker ps -a | grep $image_id - docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} - fi -done - -if [[ -n $(docker ps -a | grep $BOTTLENECKS_IMAGE) ]]; then - echo "Removing existing $BOTTLENECKS_IMAGE containers" - docker ps -a | grep $BOTTLENECKS_IMAGE | awk '{print $1}' | xargs docker rm -f >$redirect -fi - -if [[ -n $(docker images | grep $BOTTLENECKS_IMAGE) ]]; then - echo "Bottlenecks: docker images to remove:" - docker images | head -1 && docker images | grep $BOTTLENECKS_IMAGE - image_tags=($(docker images | grep $BOTTLENECKS_IMAGE | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image $BOTTLENECKS_IMAGE:$tag..." - docker rmi $BOTTLENECKS_IMAGE:$tag >$redirect - done -fi - -echo "Yardstick: docker containers/images cleaning up" -YARDSTICK_IMAGE=opnfv/yardstick - -dangling_images=($(docker images -f "dangling=true" | grep $YARDSTICK_IMAGE | awk '{print $3}')) -if [[ -n $dangling_images ]]; then - echo "Removing $YARDSTICK_IMAGE:<none> dangling images and their containers" - docker images | head -1 && docker images | grep $dangling_images - for image_id in "${dangling_images[@]}"; do - echo "Yardstick: Removing dangling image $image_id" - docker rmi -f $image_id >${redirect} - done -fi - -for image_id in "${dangling_images[@]}"; do - if [[ -n $(docker ps -a | grep $image_id) ]]; then - echo "Yardstick: Removing containers associated with dangling image: $image_id" - docker ps -a | head -1 && docker ps -a | grep $image_id - docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} - fi -done - -if [[ -n $(docker ps -a | grep $YARDSTICK_IMAGE) ]]; then - echo "Removing existing $YARDSTICK_IMAGE containers" - docker ps -a | grep $YARDSTICK_IMAGE | awk '{print $1}' | xargs docker rm -f >$redirect -fi - -if [[ -n $(docker images | grep $YARDSTICK_IMAGE) ]]; then - echo "Yardstick: docker images to remove:" - docker images | head -1 && docker images | grep $YARDSTICK_IMAGE - image_tags=($(docker images | grep $YARDSTICK_IMAGE | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image $YARDSTICK_IMAGE:$tag..." - docker rmi $YARDSTICK_IMAGE:$tag >$redirect - done -fi - -echo "InfluxDB: docker containers/images cleaning up" -INFLUXDB_IMAGE=tutum/influxdb - -dangling_images=($(docker images -f "dangling=true" | grep $INFLUXDB_IMAGE | awk '{print $3}')) -if [[ -n $dangling_images ]]; then - echo "Removing $INFLUXDB_IMAGE:<none> dangling images and their containers" - docker images | head -1 && docker images | grep $dangling_images - for image_id in "${dangling_images[@]}"; do - echo "InfluxDB: Removing dangling image $image_id" - docker rmi -f $image_id >${redirect} - done -fi - -for image_id in "${dangling_images[@]}"; do - if [[ -n $(docker ps -a | grep $image_id) ]]; then - echo "InfluxDB: Removing containers associated with dangling image: $image_id" - docker ps -a | head -1 && docker ps -a | grep $image_id - docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} - fi -done - -if [[ -n $(docker ps -a | grep $INFLUXDB_IMAGE) ]]; then - echo "Removing existing $INFLUXDB_IMAGE containers" - docker ps -a | grep $INFLUXDB_IMAGE | awk '{print $1}' | xargs docker rm -f >$redirect -fi - -if [[ -n $(docker images | grep $INFLUXDB_IMAGE) ]]; then - echo "InfluxDB: docker images to remove:" - docker images | head -1 && docker images | grep $INFLUXDB_IMAGE - image_tags=($(docker images | grep $INFLUXDB_IMAGE | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image $INFLUXDB_IMAGE:$tag..." - docker rmi $INFLUXDB_IMAGE:$tag >$redirect - done -fi
\ No newline at end of file +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd 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 +############################################################################## + +BASEDIR=`dirname $0` + +#clean up correlated dockers and their images +bash ${BASEDIR}/docker_cleanup.sh -d bottlenecks --debug +bash ${BASEDIR}/docker_cleanup.sh -d yardstick --debug +bash ${BASEDIR}/docker_cleanup.sh -d kibana --debug +bash ${BASEDIR}/docker_cleanup.sh -d elasticsearch --debug +bash ${BASEDIR}/docker_cleanup.sh -d influxdb --debug
\ No newline at end of file diff --git a/jjb/bottlenecks/bottlenecks-run-suite.sh b/jjb/bottlenecks/bottlenecks-run-suite.sh index f69463fc2..0df659af2 100644 --- a/jjb/bottlenecks/bottlenecks-run-suite.sh +++ b/jjb/bottlenecks/bottlenecks-run-suite.sh @@ -55,7 +55,7 @@ else sleep 5 docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE elif [[ $SUITE_NAME == posca_stress_ping ]]; then - TEST_CASE=posca_stress_ping + TEST_CASE=posca_factor_ping sleep 5 docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE fi diff --git a/jjb/bottlenecks/docker_cleanup.sh b/jjb/bottlenecks/docker_cleanup.sh new file mode 100644 index 000000000..cfc8e8b0e --- /dev/null +++ b/jjb/bottlenecks/docker_cleanup.sh @@ -0,0 +1,106 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd 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 +############################################################################## + +usage="Script to clear up dockers and their images. + +usage: + bash $(basename "$0") [-h|--help] [-d|--docker <docker name>] [--debug] + +where: + -h|--help show the help text + -d|--docker specify dockers' name + <docker name> keyword of dockers' name used to find dockers + e.g. keyword "bottlenecks" to find "opnfv/bottlenecks:*" + --debug print debug information with default false + +examples: + $(basename "$0") + $(basename "$0") -d bottlenecks --debug" + +clnup_debug=false + +while [[ $#>0 ]]; do + clnup_docr="$1" + case $clnup_docr in + -h|--help) + echo "$usage" + exit 0 + shift + ;; + -d|--docker) + docker_name="$2" + shift + + if [[ $2 == "--debug" ]]; then + clnup_debug=true + shift + fi + ;; + --debug) + clnup_debug=true + shift + if [[ "$1" == "-d" || "$1" == "--docker" ]]; then + docker_name="$2" + shift + fi + ;; + *) + echo "unknow options $1 $2 $3" + exit 1 + ;; + esac + shift +done + + +# check if docker name is empty +if [[ $docker_name == "" ]]; then + echo empty docker name + exit 1 +fi + +# clean up dockers and their images with keyword in their names +[[ $clnup_debug == true ]] && redirect="/dev/stdout" || redirect="/dev/null" + +echo "$docker_name: docker containers/images cleaning up" + +dangling_images=($(docker images -f "dangling=true" | grep $docker_name | awk '{print $3}')) +if [[ -n $dangling_images ]]; then + echo "Removing $docker_name:<none> dangling images and their containers" + docker images | head -1 && docker images | grep $dangling_images + for image_id in "${dangling_images[@]}"; do + echo "$docker_name: Removing dangling image $image_id" + docker rmi -f $image_id >${redirect} + done +fi + +for image_id in "${dangling_images[@]}"; do + if [[ -n $(docker ps -a | grep $image_id) ]]; then + echo "$docker_name: Removing containers associated with dangling image: $image_id" + docker ps -a | head -1 && docker ps -a | grep $image_id + docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} + fi +done + +if [[ -n $(docker ps -a | grep $docker_name) ]]; then + echo "Removing existing $docker_name containers" + docker ps -a | head -1 && docker ps -a | grep $docker_name + docker ps -a | grep $docker_name | awk '{print $1}' | xargs docker rm -f >$redirect +fi + +if [[ -n $(docker images | grep $docker_name) ]]; then + echo "$docker_name: docker images to remove:" + docker images | head -1 && docker images | grep $docker_name + image_ids=($(docker images | grep $docker_name | awk '{print $3}')) + for image_id in "${image_ids[@]}"; do + echo "Removing docker image $docker_name:$tag..." + docker rmi $image_id >$redirect + done +fi diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 0bd32a4ab..b65e6d5ef 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -208,15 +208,18 @@ - 'dovetail-cleanup' - 'dovetail-run' + wrappers: + - fix-workspace-permissions + publishers: - archive: artifacts: 'results/**/*' allow-empty: true fingerprint: true -######################## +#-------------------------- # builder macros -######################## +#-------------------------- - builder: name: dovetail-run builders: diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index f9a3df626..5161a3c7c 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -85,9 +85,11 @@ echo "Container exec command: ${run_cmd}" docker exec $container_id ${run_cmd} sudo cp -r ${DOVETAIL_REPO_DIR}/results ./ -#To make sure the file owner is jenkins, for the copied results files in the above line -#if not, there will be error when next time to wipe workspace -sudo chown -R jenkins:jenkins ${WORKSPACE}/results +# To make sure the file owner is the current user, for the copied results files in the above line +# if not, there will be error when next time to wipe workspace +# CURRENT_USER=${SUDO_USER:-$USER} +# PRIMARY_GROUP=$(id -gn $CURRENT_USER) +# sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results echo "Dovetail: done!" diff --git a/jjb/dovetail/dovetail-weekly-jobs.yml b/jjb/dovetail/dovetail-weekly-jobs.yml index 8edce4246..7b3ede902 100644 --- a/jjb/dovetail/dovetail-weekly-jobs.yml +++ b/jjb/dovetail/dovetail-weekly-jobs.yml @@ -114,6 +114,9 @@ - 'dovetail-cleanup' - 'dovetail-run' + wrappers: + - fix-workspace-permissions + publishers: - archive: artifacts: 'results/**/*' diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 6fdb4caf4..ced335cb9 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -164,6 +164,14 @@ users: - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' +- wrapper: + name: fix-workspace-permissions + wrappers: + - pre-scm-buildstep: + - shell: | + #!/bin/bash + sudo chown -R $USER $WORKSPACE || exit 1 + - builder: name: build-html-and-pdf-docs-output builders: diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index 78ec32b85..8d607f985 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -82,7 +82,7 @@ disable-strict-forbidden-file-verification: 'true' forbidden-file-paths: - compare-type: ANT - pattern: 'docs/**|.gitignore' + pattern: 'docs/**' builders: - description-setter: diff --git a/jjb/xci/bifrost-cleanup-job.yml b/jjb/xci/bifrost-cleanup-job.yml index 4e9e2a8d4..d4b2157da 100644 --- a/jjb/xci/bifrost-cleanup-job.yml +++ b/jjb/xci/bifrost-cleanup-job.yml @@ -65,9 +65,16 @@ echo "gsutil will not be executed until this is fixed!" exit 1 fi - # No force (-f). We always verify upstream jobs so if there are no logs - # something else went wrong and we need to break immediately and investigate - gsutil -m rm -r $BIFROST_GS_URL + try_to_rm=1 + while [[ $try_to_rm -lt 6 ]]; do + gsutil -m rm -r $BIFROST_GS_URL && _exitcode=$? && break + _exitcode=$? + echo "gsutil rm failed! Trying again... (attempt #$i)" + let try_to_rm += 1 + # Give it some time... + sleep 10 + done + exit $_exitcode triggers: - '{project}-gerrit-trigger-cleanup': diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml index 2fa99b290..b93456ee2 100644 --- a/jjb/xci/bifrost-verify-jobs.yml +++ b/jjb/xci/bifrost-verify-jobs.yml @@ -161,7 +161,7 @@ - bifrost-build wrappers: - - bifrost-fix-perms-workspace + - fix-workspace-permissions publishers: - email: @@ -226,17 +226,6 @@ readable-message: true #--------------------------- -# wrapper macros -#--------------------------- -- wrapper: - name: bifrost-fix-perms-workspace - wrappers: - - pre-scm-buildstep: - - shell: | - #!/bin/bash - sudo chown -R $USER $WORKSPACE || exit 1 - -#--------------------------- # builder macros #--------------------------- - builder: |