From 06b27e5e3dd35a8a9b7c76c20844a7ad064e1541 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Oct 2010 19:53:34 -0700 Subject: autobuild: show top commit in emails --- script/autobuild.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'script') diff --git a/script/autobuild.py b/script/autobuild.py index 2859c5f0de..a0c2d9f4e6 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -344,11 +344,19 @@ You can see logs of the failed task here: http://git.samba.org/%s/samba-autobuild/%s.stdout http://git.samba.org/%s/samba-autobuild/%s.stderr +A summary of the autobuild process is here: + + http://git.samba.org/%s/samba-autobuild/autobuild.log + or you can get full logs of all tasks in this job here: http://git.samba.org/%s/samba-autobuild/logs.tar.gz -''' % (failed_task, errstr, user, failed_tag, user, failed_tag, user) +The top commit for the tree that was built was: + +%s + +''' % (failed_task, errstr, user, failed_tag, user, failed_tag, user, user, top_commit_msg) msg = MIMEText(text) msg['Subject'] = 'autobuild failure for task %s during %s' % (failed_task, failed_stage) msg['From'] = 'autobuild@samba.org' @@ -376,7 +384,14 @@ you can get full logs of all tasks in this job here: http://git.samba.org/%s/samba-autobuild/logs.tar.gz -''' % (user,) +''' % user + + text += ''' +The top commit for the tree that was built was: + +%s +''' % top_commit_msg + msg = MIMEText(text) msg['Subject'] = 'autobuild success' msg['From'] = 'autobuild@samba.org' @@ -401,6 +416,9 @@ gitroot = find_git_root() if gitroot is None: raise Exception("Failed to find git root") +# get the top commit message, for emails +top_commit_msg = run_cmd("git log -1", dir=gitroot, output=True) + try: os.makedirs(testbase) except Exception, reason: -- cgit