[Qa-jenkins-scm] [jenkins.debian.net] 01/01: rebootstrap: add new wrapper, rebootstrap.sh

Holger Levsen holger at moszumanska.debian.org
Tue Sep 1 18:09:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit ecdf85924f1765fc98ae98021a82d9d68482bc27
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Sep 1 20:08:52 2015 +0200

    rebootstrap: add new wrapper, rebootstrap.sh
---
 bin/jenkins_node_wrapper.sh |  2 +-
 bin/rebootstrap.sh          | 25 +++++++++++++++++++++++++
 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 5646b1a..cf2dd3b 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 0000000..1b7ef1e
--- /dev/null
+++ b/bin/rebootstrap.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Copyright © 2015 Holger Levsen <holger at 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 bb3317a..1653549 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')
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list