summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-20 20:03:32 +0000
committerHolger Levsen <holger@layer-acht.org>2015-07-05 14:59:12 +0200
commit0ce20ad2539d55c48340ca68e46dae1741d1bfdf (patch)
treebc42e37a0f59f660a8d562323ccd16150e78c5bf /bin
parentc976ffa8e4b3cc976f3310a138e71e3cb5bb5d94 (diff)
downloadjenkins.debian.net-0ce20ad2539d55c48340ca68e46dae1741d1bfdf.tar.xz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 27076c0f..8a1522f9 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@lists.alioth.debian.org>" \
"$SRCPACKAGE@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