[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible debian: build.sh: copy build artifacts locally before further…

Mattia Rizzolo gitlab at salsa.debian.org
Tue Jun 19 17:08:59 BST 2018


Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
63ced24c by Mattia Rizzolo at 2018-06-19T18:05:33+02:00
reproducible debian: build.sh: copy build artifacts locally before further ascertain the build status

otherwise we won't copy the build log in case of FTBFS

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
69544673 by Mattia Rizzolo at 2018-06-19T18:08:35+02:00
reproducible debian: build.sh: drop pipe and console logging during first_build(): those msgs are lost anyway

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- bin/reproducible_build.sh


Changes:

=====================================
bin/reproducible_build.sh
=====================================
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -626,8 +626,9 @@ EOF
 	else
 		echo "BUILDDIR=/build" >> "$TMPCFG"
 	fi
+	set +e
 	# remember to change the sudoers setting if you change the following command
-	( sudo timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice \
+	sudo timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice \
 	  /usr/sbin/pbuilder --build \
 		--configfile $TMPCFG \
 		--debbuildopts "-b --buildinfo-id=${ARCH}" \
@@ -635,15 +636,13 @@ EOF
 		--buildresult $TMPDIR/b1 \
 		--logfile b1/build.log \
 		${SRCPACKAGE}_${EVERSION}.dsc
-	) 2>&1 | log_file -
-	local PRESULT=${PIPESTATUS[0]}
+	local PRESULT=$?
+	set -e
 	if ! "$DEBUG" ; then set +x ; fi
 	rm $TMPCFG
 	case $PRESULT in
 		124)
-			msg="pbuilder was killed by timeout after 18h."
-			log_error "$msg"
-			echo "$(date -u) - $msg" | tee -a b1/build.log
+			echo "$(date -u) - pbuilder was killed by timeout after 18h." | tee -a b1/build.log
 			exit 3
 			;;
 		1)  # FTBFS, for whatever reason.
@@ -766,28 +765,15 @@ remote_build() {
 	check_node_is_up $NODE $PORT $SLEEPTIME
 	set +e
 	ssh -o "BatchMode = yes" -p $PORT $NODE /srv/jenkins/bin/reproducible_build.sh $BUILDNR ${SRCPACKAGE} ${SUITE} ${TMPDIR} "$VERSION"
-	local RESULT=$?
-	case $RESULT in
-		148)  # 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
-			handle_E404
-			;;
-		2|3)
-			handle_ftbfs
-			;;
-		0)  # build succcessfully completed
-			;;
-		*)
-			handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} on ${SUITE}/${ARCH}"
-			;;
-	esac
+	local BUILD_RESULT=$?
 	rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
-	RESULT=$?
-	if [ $RESULT -ne 0 ] ; then
+	local RSYNC_RESULT=$?
+	if [ $RSYNC_RESULT -ne 0 ] ; then
 		log_warning "rsync from $NODE failed, sleeping 2m before re-trying..."
 		sleep 2m
 		rsync -e "ssh -o 'BatchMode = yes' -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/
-		RESULT=$?
-		if [ $RESULT -ne 0 ] ; then
+		local RSYNC_RESULT=$?
+		if [ $RSYNC_RESULT -ne 0 ] ; then
 			handle_remote_error "when rsyncing remote build #$BUILDNR results from $NODE"
 		fi
 	fi
@@ -798,6 +784,19 @@ remote_build() {
 	if [ $BUILDNR -eq 1 ] ; then
 		log_file $TMPDIR/b1/build.log
 	fi
+	case $BUILD_RESULT in
+		148)  # 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
+			handle_E404
+			;;
+		2|3)
+			handle_ftbfs
+			;;
+		0)  # build succcessfully completed
+			;;
+		*)
+			handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE} on ${SUITE}/${ARCH}"
+			;;
+	esac
 }
 
 check_installed_build_depends() {



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/601a37d8cfd59e14d94aaf5a46412fca47cb042e...69544673f3203e3ea46b28918df5d1067c56228a

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/601a37d8cfd59e14d94aaf5a46412fca47cb042e...69544673f3203e3ea46b28918df5d1067c56228a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180619/45220975/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list