From a4e6d13656dae54d419f7dd94763e7775f1572e3 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Thu, 10 Nov 2011 11:55:29 -0800 Subject: [PATCH] add clean script --- tools/jenkins/jenkins_home/clean.sh | 21 +++++++++++++++++++ .../jobs/diablo-kvm_ha/config.xml | 16 +++++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100755 tools/jenkins/jenkins_home/clean.sh diff --git a/tools/jenkins/jenkins_home/clean.sh b/tools/jenkins/jenkins_home/clean.sh new file mode 100755 index 0000000..f92e0d2 --- /dev/null +++ b/tools/jenkins/jenkins_home/clean.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# This script is not yet for general consumption. + +set -o errexit + +if [ ! "$FORCE" = 1 ]; then + echo "FORCE not set to 1. Make sure this is something you really want to do. Exiting." + exit 1 +fi + +exit +virsh list | cut -d " " -f1 | grep -v "-" | egrep -e "[0-9]" | xargs -n 1 virsh destroy || true +virsh net-list | grep active | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true +killall dnsmasq +rm -rf jobs +rm /var/lib/jenkins/jobs +git checkout -f +git fetch +git merge origin/jenkins +./build_jenkins.sh + diff --git a/tools/jenkins/jenkins_home/jobs/diablo-kvm_ha/config.xml b/tools/jenkins/jenkins_home/jobs/diablo-kvm_ha/config.xml index 32ce768..820e9d6 100644 --- a/tools/jenkins/jenkins_home/jobs/diablo-kvm_ha/config.xml +++ b/tools/jenkins/jenkins_home/jobs/diablo-kvm_ha/config.xml @@ -3,7 +3,17 @@ false - + + + + + RC + + + + + + 2 @@ -58,12 +68,12 @@ set -o errexit cd tools/jenkins -sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER +sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER "$RC" set -o errexit cd tools/jenkins -sudo ./run_test.sh $EXECUTOR_NUMBER $ADAPTER +sudo ./run_test.sh $EXECUTOR_NUMBER $ADAPTER $RC "$RC"