Include the branch name in autobuild mails
Stefan Metzmacher
metze at samba.org
Wed Aug 10 19:03:45 UTC 2016
Hi,
as we're using autobuild also for the v4-*-test branches in addition to
master
it's useful to the branch name in the mail subject.
Please review and push:-)
Thanks!
metze
-------------- next part --------------
From 6c5462a63e560bff8e7f258c1f9f9b35b7999943 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 10 Aug 2016 12:44:26 +0200
Subject: [PATCH] script/autobuild.py: include the branch name in the output
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
script/autobuild.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/script/autobuild.py b/script/autobuild.py
index 811f906..419fe1a 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -634,8 +634,8 @@ The last 50 lines of log messages:
f.close()
logs = os.path.join(gitroot, 'logs.tar.gz')
- send_email('autobuild failure on %s for task %s during %s'
- % (platform.node(), failed_task, failed_stage),
+ send_email('autobuild[%s] failure on %s for task %s during %s'
+ % (options.branch, platform.node(), failed_task, failed_stage),
text, logs)
def email_success(elapsed_time, log_base=None):
@@ -666,7 +666,7 @@ The top commit for the tree that was built was:
''' % top_commit_msg
logs = os.path.join(gitroot, 'logs.tar.gz')
- send_email('autobuild success on %s' % platform.node(),
+ send_email('autobuild[%s] success on %s' % (options.branch, platform.node()),
text, logs)
@@ -768,7 +768,7 @@ else:
AUTOBUILD FAILURE
-Your autobuild on %s failed after %.1f minutes
+Your autobuild[%s] on %s failed after %.1f minutes
when trying to test %s with the following error:
%s
@@ -777,7 +777,7 @@ the autobuild has been abandoned. Please fix the error and resubmit.
####################################################################
-''' % (platform.node(), elapsed_minutes, failed_task, errstr)
+''' % (options.branch, platform.node(), elapsed_minutes, failed_task, errstr)
cleanup()
print(errstr)
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160810/1418ecee/signature.sig>
More information about the samba-technical
mailing list