diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/bottlenecks/bottlenecks-cleanup.sh | 12 | ||||
-rw-r--r-- | jjb/bottlenecks/docker_cleanup.sh | 106 | ||||
-rw-r--r-- | jjb/cperf/cperf-ci-jobs.yml | 12 | ||||
-rw-r--r-- | jjb/dovetail/dovetail-ci-jobs.yml | 4 | ||||
-rw-r--r-- | jjb/dovetail/dovetail-weekly-jobs.yml | 4 | ||||
-rw-r--r-- | jjb/releng/testapi-automate.yml | 3 |
6 files changed, 17 insertions, 124 deletions
diff --git a/jjb/bottlenecks/bottlenecks-cleanup.sh b/jjb/bottlenecks/bottlenecks-cleanup.sh index 052f72eef..04e620c7f 100644 --- a/jjb/bottlenecks/bottlenecks-cleanup.sh +++ b/jjb/bottlenecks/bottlenecks-cleanup.sh @@ -8,11 +8,9 @@ # 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 +bash $WORKSPACE/docker/docker_cleanup.sh -d bottlenecks --debug +bash $WORKSPACE/docker/docker_cleanup.sh -d yardstick --debug +bash $WORKSPACE/docker/docker_cleanup.sh -d kibana --debug +bash $WORKSPACE/docker/docker_cleanup.sh -d elasticsearch --debug +bash $WORKSPACE/docker/docker_cleanup.sh -d influxdb --debug diff --git a/jjb/bottlenecks/docker_cleanup.sh b/jjb/bottlenecks/docker_cleanup.sh deleted file mode 100644 index cfc8e8b0e..000000000 --- a/jjb/bottlenecks/docker_cleanup.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/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/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index 2742f08f7..6cd4e22dc 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -126,14 +126,18 @@ undercloud_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]+") INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'}) - sudo scp $INSTALLER_IP:/home/stack/stackrc /tmp/stackrc - source /tmp/stackrc + sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/overcloudrc /tmp/overcloudrc + sudo chmod 755 /tmp/overcloudrc + source /tmp/overcloudrc # robot suites need the ssh key to log in to controller nodes, so throwing it # in tmp, and mounting /tmp as $HOME as far as robot is concerned sudo mkdir -p /tmp/.ssh - sudo scp $INSTALLER_IP:/home/stack/.ssh/id_rsa /tmp/.ssh/ - sudo chmod -R 0600 /tmp/.ssh + sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/.ssh/id_rsa /tmp/.ssh/ + sudo chown -R jenkins-ci:jenkins-ci /tmp/.ssh + # done with sudo. jenkins-ci is the user from this point + sudo mv /tmp/.ssh/id_rsa ~jenkins-ci/.ssh/ + chmod -R 0600 ~jenkins-ci/.ssh # cbench requires the openflow drop test feature to be installed. sshpass -p karaf ssh -o StrictHostKeyChecking=no \ diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index b65e6d5ef..5651fc3f2 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -169,6 +169,7 @@ - timeout: timeout: 180 abort: true + - fix-workspace-permissions triggers: - '{auto-trigger-name}' @@ -208,9 +209,6 @@ - 'dovetail-cleanup' - 'dovetail-run' - wrappers: - - fix-workspace-permissions - publishers: - archive: artifacts: 'results/**/*' diff --git a/jjb/dovetail/dovetail-weekly-jobs.yml b/jjb/dovetail/dovetail-weekly-jobs.yml index 7b3ede902..eaa11b54a 100644 --- a/jjb/dovetail/dovetail-weekly-jobs.yml +++ b/jjb/dovetail/dovetail-weekly-jobs.yml @@ -78,6 +78,7 @@ - timeout: timeout: '{job-timeout}' abort: true + - fix-workspace-permissions parameters: - project-parameter: @@ -114,9 +115,6 @@ - 'dovetail-cleanup' - 'dovetail-run' - wrappers: - - fix-workspace-permissions - publishers: - archive: artifacts: 'results/**/*' diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml index dd76538a3..8f3ae0c23 100644 --- a/jjb/releng/testapi-automate.yml +++ b/jjb/releng/testapi-automate.yml @@ -258,7 +258,8 @@ name: 'testapi-automate-docker-deploy-macro' builders: - shell: | - bash ./jjb/releng/testapi-docker-deploy.sh + echo 'disable TestAPI update temporarily due to frequent change' +# bash ./jjb/releng/testapi-docker-deploy.sh ################################ # job publishers |