diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-23 17:26:40 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-25 13:08:08 +0200 |
commit | 9c1c845a51249714a528133a65ba89c70469e472 (patch) | |
tree | 07718060c6b11d3ee5018ddf8c583a72ee9eba10 /bin/reproducible_common.sh | |
parent | 8afbbad8f7da157097fb05d57d01583c03e55ddd (diff) | |
download | jenkins.debian.net-9c1c845a51249714a528133a65ba89c70469e472.tar.xz |
reproducible: add a sane mean to notify the IRC channel when builds finish.
* new column in the database, schedule table
* turn $SAVE_ARTIFACTS a true boolean, 0→no artifacts, 1→yes artifacts
* $NOTIFY in the build script is text containg a keyword:
+ if empty no notification will be sent
+ if "debbindiff" a "$DBDVERSION had trouble with these" will be sent
+ if "failure" a "no artifacts could have been saved"-like will be sent
+ any other value trigs a normal message
* adapt the maintenance script and the manual scheduler to cope with the new
column
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-x | bin/reproducible_common.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index b39ddc01..40608f39 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -90,10 +90,8 @@ schedule_packages() { MINS=$(date +'%M') # schedule on the full hour so we can recognize them easily DATE=$(date +'%Y-%m-%d %H:%M' -d "$DAYS day ago - $HOURS hours - $MINS minutes") TMPFILE=$(mktemp) - ARTIFACTS=$1 - shift for PKG_ID in $@ ; do - echo "REPLACE INTO schedule (package_id, date_scheduled, date_build_started, save_artifacts) VALUES ('$PKG_ID', '$DATE', '', '$ARTIFACTS');" >> $TMPFILE + echo "REPLACE INTO schedule (package_id, date_scheduled, date_build_started, save_artifacts, notify) VALUES ('$PKG_ID', '$DATE', '', '$ARTIFACTS', '$NOTIFY');" >> $TMPFILE done cat $TMPFILE | sqlite3 -init $INIT ${PACKAGES_DB} rm $TMPFILE |