[Qa-jenkins-scm] [jenkins.debian.net] 11/11: reproducible/openwrt|lede: remove openwrt_mktempdir

Holger Levsen holger at layer-acht.org
Tue Aug 2 14:25:02 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 011bef2cb827cea35dc851c8da7740b8167571a3
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Tue Aug 2 15:21:06 2016 +0200

    reproducible/openwrt|lede: remove openwrt_mktempdir
    
    Use the same directory across multiple nodes
    
    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 | 28 ++++++++++++++--------------
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index 6b639ff..83bc7ed 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -25,7 +25,6 @@ case $1 in
 		case $1 in
 			openwrt_build |\
 			openwrt_get_banner |\
-			openwrt_mktempdir |\
 			openwrt_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 c8e38d5..c4c2096 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -25,7 +25,6 @@ case $1 in
 		case $1 in
 			openwrt_build |\
 			openwrt_get_banner |\
-			openwrt_mktempdir |\
 			openwrt_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 64e341c..5eb3b08 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -9,10 +9,6 @@
 GENERIC_NODE1=profitbricks-build3-amd64.debian.net
 GENERIC_NODE2=profitbricks-build4-amd64.debian.net
 
-openwrt_mktempdir() {
-	mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-lede-build-XXXXXXXX
-}
-
 # only called direct on a remote build node
 openwrt_cleanup_tmpdirs() {
 	export TMPDIR=$1
@@ -216,6 +212,13 @@ openwrt_build() {
 	local CONFIG=$4
 	export TMPDIR=$5
 	export TMPBUILDDIR=$TMPDIR/build/
+
+	if [ -d $TMPDIR ] ; then
+		echo "============================================================================="
+		echo "TMPDIR already exists! $TMPDIR"
+		echo "============================================================================="
+		exit 1
+	fi
 	mkdir -p $TMPBUILDDIR
 
 	# we have also to set the TMP
@@ -261,21 +264,18 @@ build_two_times() {
 
 	## first run
 	RUN=b1
-	TMPDIR_B1=$(ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_mktempdir)
-	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B1
-
-	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR_B1 $TYPE > $BANNER_HTML
+	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR
+	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR $TYPE > $BANNER_HTML
 
 	# rsync back logs and images
-	rsync -a $GENERIC_NODE1:$TMPDIR_B1/$RUN/ $TMPDIR/$RUN/
-	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B1
+	rsync -a $GENERIC_NODE1:$TMPDIR/$RUN/ $TMPDIR/$RUN/
+	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR
 
 	## second run
 	RUN=b2
-	TMPDIR_B2=$(ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_mktempdir)
-	ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B2
+	ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR
 
 	# rsync back logs and images
-	rsync -a $GENERIC_NODE2:$TMPDIR_B2/$RUN/ $TMPDIR/$RUN/
-	ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B2
+	rsync -a $GENERIC_NODE2:$TMPDIR/$RUN/ $TMPDIR/$RUN/
+	ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR
 }

-- 
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