summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-01 20:08:52 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-01 20:08:52 +0200
commitecdf85924f1765fc98ae98021a82d9d68482bc27 (patch)
treeef19a4bd73ce870dce61ab398fad84ee05b626ff /bin
parenta56594028e41fecc4f8513bbed81d32aee29f2fc (diff)
downloadjenkins.debian.net-ecdf85924f1765fc98ae98021a82d9d68482bc27.tar.xz
rebootstrap: add new wrapper, rebootstrap.sh
Diffstat (limited to 'bin')
-rwxr-xr-xbin/jenkins_node_wrapper.sh2
-rwxr-xr-xbin/rebootstrap.sh25
2 files changed, 26 insertions, 1 deletions
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh
index 5646b1a0..cf2dd3b4 100755
--- a/bin/jenkins_node_wrapper.sh
+++ b/bin/jenkins_node_wrapper.sh
@@ -64,7 +64,7 @@ if [[ "$*" =~ /bin/nc\ localhost\ 4949 ]] ; then
exec /bin/nc localhost 4949 ; croak "Exec failed";
elif [[ "$*" =~ rebootstrap_.* ]] ; then
shift
- REBOOTSTRAPSH="/srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh $@"
+ REBOOTSTRAPSH="/srv/jenkins/bin/rebootstrap.sh $@"
export LC_ALL=C
exec $REBOOTSTRAPSH; croak "Exec failed";
elif [ "$1" = "/srv/jenkins/bin/reproducible_build.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
diff --git a/bin/rebootstrap.sh b/bin/rebootstrap.sh
new file mode 100755
index 00000000..1b7ef1ec
--- /dev/null
+++ b/bin/rebootstrap.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Copyright © 2015 Holger Levsen <holger@debian.org>
+# released under the GPLv=2
+
+DEBUG=true
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+cleanup_all() {
+ rm -r $CODE
+}
+
+CODE=$(mktemp --tmpdir=/tmp gitclone-XXXXXXXXX -u)
+trap cleanup_all INT TERM EXIT
+git clone git://anonscm.debian.org/users/helmutg/rebootstrap.git --depth 1 $CODE
+cd $CODE
+git checkout $1
+shift
+export LC_ALL=C
+echo "$(date -u) - Now running '/srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh $@'"
+/srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh $@
+cd
+cleanup_all
+trap - INT TERM EXIT