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_schedule_on_demand.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_schedule_on_demand.sh')
-rwxr-xr-x | bin/reproducible_schedule_on_demand.sh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/bin/reproducible_schedule_on_demand.sh b/bin/reproducible_schedule_on_demand.sh index 436c6059..27c32dc8 100755 --- a/bin/reproducible_schedule_on_demand.sh +++ b/bin/reproducible_schedule_on_demand.sh @@ -22,14 +22,24 @@ if [ "$SUITE" = "sid" ] ; then SUITE=unstable fi -ARTIFACTS=0 -if [ "$1" = "artifacts" ] ; then - ARTIFACTS=1 - shift - echo - echo "The artifacts of the build(s) will be saved to the location mentioned at the end of the build log(s)." - echo -fi +case "$1" in + "artifacts") + ARTIFACTS=1 + NOTIFY=true + shift + printf "\nThe artifacts of the build(s) will be saved to the location mentioned at the end of the build log(s).\n\n" + ;; + "notify") + ARTIFACTS=0 + NOTIFY=true + shift + printf "\nThe IRC channel will be notify once the build(s) finished.\n\n" + ;; + *) + ARTIFACTS=0 + NOTIFY='' + ;; +esac CANDIDATES="$@" check_candidates @@ -43,10 +53,12 @@ fi MESSAGE="$TOTAL $PACKAGES_TXT $ACTION in $SUITE: ${PACKAGES_NAMES:0:256}$BLABLABLA" if [ $ARTIFACTS -eq 1 ] ; then MESSAGE="$MESSAGE - artifacts will be preserved." +elif $NOTIFY ; then + MESSAGE="$MESSAGE - notification once finished." fi # finally -schedule_packages $ARTIFACTS $PACKAGE_IDS +schedule_packages $PACKAGE_IDS echo echo "$MESSAGE" if [ -z "${BUILD_URL:-}" ] && [ $TOTAL -ne 0 ] ; then |