[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible/openwrt|lede: add command node_create_tmpdirs
Holger Levsen
holger at layer-acht.org
Wed Oct 12 16:40:27 UTC 2016
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 093579017eb890caf5f2278f273200750f736f7e
Author: Alexander Couzens <lynxis at fe80.eu>
Date: Wed Oct 12 18:37:36 2016 +0200
reproducible/openwrt|lede: add command node_create_tmpdirs
create tmpdir in a spereate step
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_lede.sh | 1 +
bin/reproducible_openwrt.sh | 1 +
bin/reproducible_openwrt_common.sh | 13 ++++++++++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index bccc6d0..cf19221 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -27,6 +27,7 @@ case $1 in
openwrt_build |\
openwrt_download |\
openwrt_get_banner |\
+ node_create_tmpdirs |\
node_cleanup_tmpdirs) ;; # this is the allowed list
*)
echo "Unsupported remote node function $@"
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index cf7eedc..07233d2 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -27,6 +27,7 @@ case $1 in
openwrt_build |\
openwrt_download |\
openwrt_get_banner |\
+ node_create_tmpdirs |\
node_cleanup_tmpdirs) ;; # this is the allowed list
*)
echo "Unsupported remote node function $@"
diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh
index 936a48d..042a47e 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -23,6 +23,16 @@ node_cleanup_tmpdirs() {
rm -rf $TMPDIR
}
+node_create_tmpdirs() {
+ export TMPDIR=$1
+ # (very simple) check what we are creating
+ if [ "${TMPDIR:0:26}" != "/srv/reproducible-results/" ] || [ ${#TMPDIR} -le 26 ] ; then
+ echo "Something very strange with \$TMPDIR=$TMPDIR exiting instead of doing create."
+ exit 1
+ fi
+ mkdir -p $TMPDIR/download
+}
+
# called as trap handler
# called on cleanup
master_cleanup_tmpdirs() {
@@ -206,7 +216,6 @@ openwrt_download() {
local CONFIG=$3
local TMPDIR=$4
- mkdir -p $TMPDIR/download
cd $TMPDIR/download
# checkout the repo
@@ -295,6 +304,8 @@ build_two_times() {
TARGET=$2
CONFIG=$3
+ ssh $GENERIC_NODE1 reproducible_$TYPE node node_create_tmpdirs $TMPDIR
+ ssh $GENERIC_NODE2 reproducible_$TYPE node node_create_tmpdirs $TMPDIR
# download and prepare openwrt on node b1
ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
rsync -a $GENERIC_NODE1:$TMPDIR/download/ $TMPDIR/download/
--
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