diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-11-23 15:25:22 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-11-23 15:25:22 +0100 |
commit | 30877cfbb7ed1d9427d16a5e23594ce1ef909a3a (patch) | |
tree | 4fe7c600f89fcc7212843ff7c7b47929ca822f7d /bin | |
parent | 1d564ea83be26c8d761b0237ff67ff2226bce03b (diff) | |
download | jenkins.debian.net-30877cfbb7ed1d9427d16a5e23594ce1ef909a3a.tar.xz |
YOLO: further improve message format
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/email2irc.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/email2irc.sh b/bin/email2irc.sh index a2bb8716..20dc8f50 100755 --- a/bin/email2irc.sh +++ b/bin/email2irc.sh @@ -112,8 +112,13 @@ if [ "$VALID_MAIL" = "true" ] ; then echo "My line: $MY_LINE" >> $LOGFILE # only notify if there is a channel to notify if [ ! -z $CHANNEL ] ; then - # log message + # format message MESSAGE="$(echo $SUBJECT | cut -d ':' -f1) $(echo $MY_LINE|sed -s 's#Changes:##g') " + MESSAGE="$(echo $MESSAGE | sed -s 's# See ##g') " + MESSAGE="$(echo $MESSAGE | sed -s 's# in Jenkins ##g') " + MESSAGE="$(echo $MESSAGE | sed -s 's#Failure #Failed #g') " + MESSAGE="$(echo $MESSAGE | sed -s 's#Build failed #Failed #g') " + # log message echo "Notified #$CHANNEL with $MESSAGE" >> $LOGFILE # notify kgb kgb-client --conf /srv/jenkins/kgb/$CHANNEL.conf --relay-msg "$MESSAGE" && echo "kgb informed successfully." >> $LOGFILE |