diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-19 09:35:36 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-09 11:28:32 +0100 |
commit | 629ea43e9c361d2a2bed28bf093addd849029374 (patch) | |
tree | 42ffbb8232bb050bc4e7df826ead048a471cd644 /bin/reproducible_build.sh | |
parent | 46ddc27f0bbdc0aa0c27541d63460214c4686498 (diff) | |
download | jenkins.debian.net-629ea43e9c361d2a2bed28bf093addd849029374.tar.xz |
reproducible: save the schedule message in the db and show it in the "test history" table
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-x | bin/reproducible_build.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 87dda59a..ce471cc1 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -121,8 +121,8 @@ update_db_and_html() { sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" || \ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" 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, node1, node2, job) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" || \ - sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')" + sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job, schedule_message) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB', '$SCHEDULE_MESSAGE')" || \ + sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job, schedule_message) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB', '$SCHEDULE_MESSAGE')" fi # unmark build since it's properly finished sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM schedule WHERE package_id='$SRCPKGID';" || \ @@ -401,7 +401,7 @@ call_diffoscope_on_changes_files() { choose_package() { local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} " - SELECT s.suite, s.id, s.name, sch.date_scheduled, sch.save_artifacts, sch.notify, s.notify_maintainer + SELECT s.suite, s.id, s.name, sch.date_scheduled, sch.save_artifacts, sch.notify, s.notify_maintainer, sch.message FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id WHERE sch.date_build_started='' AND s.architecture='$ARCH' @@ -417,6 +417,7 @@ choose_package() { SAVE_ARTIFACTS=$(echo $RESULT|cut -d "|" -f5) NOTIFY=$(echo $RESULT|cut -d "|" -f6) NOTIFY_MAINTAINER=$(echo $RESULT|cut -d "|" -f7) + SCHEDULE_MESSAGE=$(echo $RESULT|cut -d "|" -f8) # remove previous build attempts which didnt finish correctly: BUILDER_PREFIX="${JOB_NAME#reproducible_builder_}/" BAD_BUILDS=$(mktemp --tmpdir=$TMPDIR) |