Browse code

add clean script

Anthony Young authored on 2011/11/11 04:55:29
Showing 2 changed files
1 1
new file mode 100755
... ...
@@ -0,0 +1,21 @@
0
+#!/bin/bash
1
+# This script is not yet for general consumption.
2
+
3
+set -o errexit
4
+
5
+if [ ! "$FORCE" = 1 ]; then
6
+    echo "FORCE not set to 1.  Make sure this is something you really want to do.  Exiting."
7
+    exit 1
8
+fi
9
+
10
+exit
11
+virsh list | cut -d " " -f1 | grep -v "-" | egrep -e "[0-9]" | xargs -n 1 virsh destroy || true
12
+virsh net-list | grep active | cut -d " " -f1 | xargs -n 1 virsh net-destroy || true
13
+killall dnsmasq
14
+rm -rf jobs
15
+rm /var/lib/jenkins/jobs
16
+git checkout -f
17
+git fetch
18
+git merge origin/jenkins
19
+./build_jenkins.sh
20
+
... ...
@@ -3,7 +3,17 @@
3 3
   <actions/>
4 4
   <description></description>
5 5
   <keepDependencies>false</keepDependencies>
6
-  <properties/>
6
+  <properties>
7
+    <hudson.model.ParametersDefinitionProperty>
8
+      <parameterDefinitions>
9
+        <hudson.model.StringParameterDefinition>
10
+          <name>RC</name>
11
+          <description></description>
12
+          <defaultValue></defaultValue>
13
+        </hudson.model.StringParameterDefinition>
14
+      </parameterDefinitions>
15
+    </hudson.model.ParametersDefinitionProperty>
16
+  </properties>
7 17
   <scm class="hudson.plugins.git.GitSCM">
8 18
     <configVersion>2</configVersion>
9 19
     <userRemoteConfigs>
... ...
@@ -58,12 +68,12 @@
58 58
     <hudson.tasks.Shell>
59 59
       <command>set -o errexit
60 60
 cd tools/jenkins
61
-sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER</command>
61
+sudo ./build_configuration.sh $EXECUTOR_NUMBER kvm $ADAPTER &quot;$RC&quot;</command>
62 62
     </hudson.tasks.Shell>
63 63
     <hudson.tasks.Shell>
64 64
       <command>set -o errexit
65 65
 cd tools/jenkins
66
-sudo ./run_test.sh $EXECUTOR_NUMBER $ADAPTER</command>
66
+sudo ./run_test.sh $EXECUTOR_NUMBER $ADAPTER $RC &quot;$RC&quot;</command>
67 67
     </hudson.tasks.Shell>
68 68
   </builders>
69 69
   <publishers/>