diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/jenkins_node_wrapper.sh | 2 | ||||
-rwxr-xr-x | bin/rebootstrap.sh | 25 |
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 |