[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: only call diffoscope if artifacts are different

Holger Levsen holger at layer-acht.org
Tue Nov 21 20:16:17 UTC 2017


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 026431ca89f8b0bbfbfe579e3815b1bcf930efd0
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Nov 21 20:16:12 2017 +0000

    reproducible Arch Linux: only call diffoscope if artifacts are different
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index b593690..5a35c75 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -326,18 +326,21 @@ remote_build 1
 # only do the 2nd build if the 1st produced results
 if [ ! -z "$(ls $TMPDIR/b1/$SRCPACKAGE/*.pkg.tar.xz 2>/dev/null|| true)" ] ; then
 	remote_build 2
-	# run diffoscope on the results
-	TIMEOUT="30m"
-	DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
-	echo "$(date -u) - Running $DIFFOSCOPE now..."
 	cd $TMPDIR/b1/$SRCPACKAGE
 	for ARTIFACT in *.pkg.tar.xz ; do
 		[ -f $ARTIFACT ] || continue
-		call_diffoscope $SRCPACKAGE $ARTIFACT
+		echo "$(date -u) - comparing results now."
 		if diff -q $TMPDIR/b1/$SRCPACKAGE/$ARTIFACT $TMPDIR/b2/$SRCPACKAGE/$ARTIFACT ; then
-			echo "YAY - $SRCPACKAGE/$ARTIFACT build reproducible in our test framework!"
+			echo "$(date -u) - YAY - $SRCPACKAGE/$ARTIFACT build reproducible in our test framework!"
+			mkdir -p $BASE/archlinux/$REPOSITORY/$SRCPACKAGE
 			echo "$SRCPACKAGE/$ARTIFACT build reproducible in our test framework:" > $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/$ARTIFACT.html
 			(cd $TMPDIR/b1/ ; sha256sum $SRCPACKAGE/$ARTIFACT >> $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/$ARTIFACT.html )
+		else
+			# run diffoscope on the results
+			TIMEOUT="30m"
+			DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
+			echo "$(date -u) - Running $DIFFOSCOPE now..."
+			call_diffoscope $SRCPACKAGE $ARTIFACT
 		fi
 		# publish page
 		if [ -f $TMPDIR/$SRCPACKAGE/$ARTIFACT.html ] ; then

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