[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible/openwrt|lede: use the same directory for lede and openwrt

Holger Levsen holger at layer-acht.org
Tue Oct 18 11:03:03 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 9d51bc382150e50278a82e117a2c592740b79bc6
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Mon Oct 17 20:52:11 2016 +0200

    reproducible/openwrt|lede: use the same directory for lede and openwrt
    
    make it simpler not have $TYPE everywhere to get the full build path
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_openwrt_common.sh | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh
index d671c24..dc17fa0 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -83,11 +83,11 @@ node_save_logs() {
 		exit 1
 	fi
 
-	if [ ! -d "$tmpdir/build/logs" ] ; then
+	if [ ! -d "$tmpdir/build/source/logs" ] ; then
 		# we create an empty tar.xz instead of failing
 		touch "$tmpdir/build_logs.tar.xz"
 	else
-		tar cJf "$tmpdir/build_logs.tar.xz" -C "$tmpdir/build/" ./logs
+		tar cJf "$tmpdir/build_logs.tar.xz" -C "$tmpdir/build/source" ./logs
 	fi
 }
 
@@ -237,19 +237,18 @@ openwrt_compile() {
 # called by openwrt_two_times
 # ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
 openwrt_download() {
-	local TYPE=$1
-	local TARGET=$2
-	local CONFIG=$3
-	local TMPDIR=$4
+	local TARGET=$1
+	local CONFIG=$2
+	local TMPDIR=$3
 
 	cd $TMPDIR/download
 
 	# checkout the repo
-	echo "============================================================================="
-	echo "$(date -u) - Cloning $TYPE git repository."
-	echo "============================================================================="
-	git clone -b $OPENWRT_GIT_BRANCH $OPENWRT_GIT_REPO $TYPE
-	cd $TYPE
+	echo "================================================================================"
+	echo "$(date -u) - Cloning git repository from $OPENWRT_GIT_REPO $OPENWRT_GIT_BRANCH. "
+	echo "================================================================================"
+	git clone -b $OPENWRT_GIT_BRANCH $OPENWRT_GIT_REPO source
+	cd source
 
 	# update feeds
 	#./scripts/feeds update
@@ -263,7 +262,7 @@ openwrt_download() {
 openwrt_get_banner() {
 	TMPDIR=$1
 	TYPE=$2
-	cd $TMPDIR/build/$TYPE
+	cd $TMPDIR/build/source
 	find build_dir/ -name banner | grep etc/banner|head -1| xargs cat /dev/null
 }
 
@@ -285,7 +284,7 @@ openwrt_build() {
 	mv "$TMPDIR/download" "$TMPBUILDDIR"
 
 	# openwrt/lede is checkouted under /download
-	cd $TMPBUILDDIR/$TYPE
+	cd $TMPBUILDDIR/source
 
 	# set tz, date, core, ..
 	openwrt_apply_variations $RUN
@@ -321,7 +320,7 @@ build_two_times() {
 	mkdir -p $WORKSPACE/results/
 
 	# download and prepare openwrt on node b1
-	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
+	ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TARGET $CONFIG $TMPDIR
 
 	echo "== master"
 	ls -la "$TMPDIR/download/" || true

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