blob: eb03022a93ec33a96b9515f19c61bba3865e129e [file] [log] [blame]
Anthony Younga4e6d132011-11-10 11:55:29 -08001#!/bin/bash
2# This script is not yet for general consumption.
3
4set -o errexit
5
Anthony Young305e3f52011-11-10 14:36:42 -08006if [ ! "$FORCE" = "yes" ]; then
Anthony Young674db1a2011-11-10 14:46:52 -08007 echo "FORCE not set to 'yes'. Make sure this is something you really want to do. Exiting."
Anthony Younga4e6d132011-11-10 11:55:29 -08008 exit 1
9fi
10
Anthony Younga4e6d132011-11-10 11:55:29 -080011virsh list | cut -d " " -f1 | grep -v "-" | egrep -e "[0-9]" | xargs -n 1 virsh destroy || true
12virsh net-list | grep active | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true
Anthony Young305e3f52011-11-10 14:36:42 -080013killall dnsmasq || true
14if [ "$CLEAN" = "yes" ]; then
15 rm -rf jobs
16fi
Anthony Younga4e6d132011-11-10 11:55:29 -080017rm /var/lib/jenkins/jobs
18git checkout -f
19git fetch
20git merge origin/jenkins
21./build_jenkins.sh