devstack_custom/tools/jenkins/jenkins_home/clean.sh

22 lines
568 B
Bash
Raw Normal View History

2011-11-10 19:55:29 +00:00
#!/bin/bash
# This script is not yet for general consumption.
set -o errexit
2011-11-10 22:36:42 +00:00
if [ ! "$FORCE" = "yes" ]; then
2011-11-10 19:55:29 +00:00
echo "FORCE not set to 1. Make sure this is something you really want to do. Exiting."
exit 1
fi
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
2011-11-10 22:36:42 +00:00
killall dnsmasq || true
if [ "$CLEAN" = "yes" ]; then
rm -rf jobs
fi
2011-11-10 19:55:29 +00:00
rm /var/lib/jenkins/jobs
git checkout -f
git fetch
git merge origin/jenkins
./build_jenkins.sh