diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-09-01 20:08:52 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-09-01 20:08:52 +0200 |
commit | ecdf85924f1765fc98ae98021a82d9d68482bc27 (patch) | |
tree | ef19a4bd73ce870dce61ab398fad84ee05b626ff | |
parent | a56594028e41fecc4f8513bbed81d32aee29f2fc (diff) | |
download | jenkins.debian.net-ecdf85924f1765fc98ae98021a82d9d68482bc27.tar.xz |
rebootstrap: add new wrapper, rebootstrap.sh
-rwxr-xr-x | bin/jenkins_node_wrapper.sh | 2 | ||||
-rwxr-xr-x | bin/rebootstrap.sh | 25 | ||||
-rwxr-xr-x | job-cfg/rebootstrap.yaml.py | 4 |
3 files changed, 28 insertions, 3 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 diff --git a/job-cfg/rebootstrap.yaml.py b/job-cfg/rebootstrap.yaml.py index bb3317a1..1653549a 100755 --- a/job-cfg/rebootstrap.yaml.py +++ b/job-cfg/rebootstrap.yaml.py @@ -78,7 +78,7 @@ print(""" branches: - '{my_branchname}' builders: - - shell: '{my_wrapper} HOST_ARCH={my_arch} {my_params}' + - shell: '{my_wrapper} {my_branchname} HOST_ARCH={my_arch} {my_params}' publishers: - logparser: parse-rules: '/srv/jenkins/logparse/rebootstrap.rules' @@ -144,5 +144,5 @@ for arch in sorted(architectures): if get_node(arch): print(" my_wrapper: '/srv/jenkins/bin/jenkins_master_wrapper.sh'") else: - print(" my_wrapper: 'LC_ALL=C /srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh'") + print(" my_wrapper: '/srv/jenkins/bin/rebootstrap.sh') |