summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-11-23 15:25:22 +0100
committerHolger Levsen <holger@layer-acht.org>2016-11-23 15:25:22 +0100
commit30877cfbb7ed1d9427d16a5e23594ce1ef909a3a (patch)
tree4fe7c600f89fcc7212843ff7c7b47929ca822f7d /bin
parent1d564ea83be26c8d761b0237ff67ff2226bce03b (diff)
downloadjenkins.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-xbin/email2irc.sh7
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