[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Arch Linux: fixup detection of bad builds

Holger Levsen gitlab at salsa.debian.org
Fri Feb 1 14:35:10 GMT 2019


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
34e71830 by Holger Levsen at 2019-02-01T14:35:03Z
reproducible Arch Linux: fixup detection of bad builds

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_build_archlinux_pkg.sh


Changes:

=====================================
bin/reproducible_build_archlinux_pkg.sh
=====================================
@@ -81,15 +81,15 @@ choose_package() {
 	SRCPACKAGE=$(echo $RESULT|cut -d "|" -f3)
 	VERSION=$(echo $RESULT|cut -d "|" -f4)
 	# remove previous build attempts which didnt finish correctly:
-	JOB_PREFIX="${JOB_NAME#reproducible_builder_}/"
+	JOB_SHORTNAME="${JOB_NAME#reproducible_builder_}"
 	BAD_BUILDS=$(mktemp --tmpdir=$TMPDIR)
-	query_db "SELECT package_id, date_build_started, job FROM schedule WHERE job LIKE '${JOB_PREFIX}%'" > $BAD_BUILDS
+	query_db "SELECT package_id, date_build_started, job FROM schedule WHERE job LIKE '%${JOB_SHORTNAME}'" > $BAD_BUILDS
 	if [ -s "$BAD_BUILDS" ] ; then
 		local STALELOG=/var/log/jenkins/reproducible-archlinux-stale-builds.log
 		# reproducible-archlinux-stale-builds.log is mailed once a day by reproducible_maintenance.sh
 		echo -n "$(date -u) - stale builds found, cleaning db from these: " | tee -a $STALELOG
 		cat $BAD_BUILDS | tee -a $STALELOG
-		query_db "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE job LIKE '${JOB_PREFIX}%'"
+		query_db "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE job LIKE '%${JOB_SHORTNAME}'"
 	fi
 	rm -f $BAD_BUILDS
 	# mark build attempt, first test if none else marked a build attempt recently



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/34e71830651033ffbaa85ba81bea3ea3699bb559

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/34e71830651033ffbaa85ba81bea3ea3699bb559
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/20190201/2de7be47/attachment.html>


More information about the Qa-jenkins-scm mailing list