summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-31 10:51:02 +0100
committerHolger Levsen <holger@layer-acht.org>2014-10-31 10:51:02 +0100
commit2b7df09051259a31924de69d4ce68d3d5571f108 (patch)
treedd43cd38f5a18304316c022de0c080da87343b6c
parent057a182115826492a04cfa1e637764cf4dc3c8d3 (diff)
downloadjenkins.debian.net-2b7df09051259a31924de69d4ce68d3d5571f108.tar.xz
email2irc: shorter irc message, more logging
-rwxr-xr-xbin/email2irc.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/email2irc.sh b/bin/email2irc.sh
index 740209ea..2e6c8a8e 100755
--- a/bin/email2irc.sh
+++ b/bin/email2irc.sh
@@ -65,14 +65,15 @@ fi
# only send notifications for valid emails
if [ "$VALID_MAIL" == "true" ] ; then
echo -e "----------\nvalid email\n-----------" >> $LOGFILE
- echo $JENKINS_JOB | cut -d ":" -f1 >> $LOGFILE
- echo $SUBJECT >> $LOGFILE
- echo $MY_LINE >> $LOGFILE
+ date >> $LOGFILE
+ echo "Job: $JENKINS_JOB" >> $LOGFILE
+ echo "Subject: $SUBJECT" >> $LOGFILE
+ echo "My line: $MY_LINE" >> $LOGFILE
# only notify if there is a channel to notify
if [ ! -z $CHANNEL ] ; then
# log message
echo "#$CHANNEL: $SUBJECT. $MY_LINE" >> $LOGFILE
- MESSAGE="$JENKINS_JOB: $SUBJECT. $MY_LINE"
+ MESSAGE="$SUBJECT. $MY_LINE"
# notify kgb
kgb-client --conf /srv/jenkins/kgb/$CHANNEL.conf --relay-msg "$MESSAGE" && echo "kgb informed successfully." >> $LOGFILE
echo >> $LOGFILE