[Qa-jenkins-scm] [jenkins.debian.net] 02/05: reproducible: build: fill that 'builder' db field. An example of the format is 'delta/12345' where 'delta is the stripped $JOB_NAME and the numbers the $BUILD_ID

Holger Levsen holger at moszumanska.debian.org
Sun Jul 5 13:04:01 UTC 2015


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 0ce20ad2539d55c48340ca68e46dae1741d1bfdf
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Sat Jun 20 20:03:32 2015 +0000

    reproducible: build: fill that 'builder' db field. An example of the format is 'delta/12345' where 'delta is the stripped $JOB_NAME and the numbers the $BUILD_ID
---
 bin/reproducible_build.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 27076c0..8a1522f 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -139,9 +139,9 @@ update_db_and_html() {
 				-a "From: Reproducible builds folks <reproducible-builds at lists.alioth.debian.org>" \
 				"$SRCPACKAGE at packages.debian.org"
 	fi
-	sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '$VERSION', '$STATUS', '$DATE', '$DURATION')"
+	sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration, builder) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$BUILDER')"
 	if [ ! -z "$DURATION" ] ; then  # this happens when not 404 and not_for_us
-		sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration) VALUES ('${SRCPACKAGE}', '${VERSION}', '${SUITE}', '${ARCH}', '${STATUS}', '${DATE}', '${DURATION}')"
+		sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, builder) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$BUILDER')"
 	fi
 	# unmark build since it's properly finished
 	sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM schedule WHERE package_id='$SRCPKGID';"
@@ -359,7 +359,7 @@ init() {
 	echo "============================================================================="
 	# mark build attempt
 	if [ -z "$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id = '$SRCPKGID'")" ] ; then
-		sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='$DATE' WHERE package_id = '$SRCPKGID'"
+		sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='$DATE', builder='$BUILDER' WHERE package_id = '$SRCPKGID'"
 	else
 		BAD_LOCKFILE=true
 		handle_race_condition db
@@ -517,6 +517,7 @@ DATE=$(date +'%Y-%m-%d %H:%M')
 START=$(date +'%s')
 RBUILDLOG=$(mktemp --tmpdir=$TMPDIR)
 BAD_LOCKFILE=false
+BUILDER="${JOB_NAME#reproducible_builder_}/${BUILD_ID}"
 
 choose_package  # defines SUITE, PKGID, SRCPACKAGE, SCHEDULED_DATE, SAVE_ARTIFACTS, NOTIFY
 

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