From 8ed3bb7219e4548031d3e07d929d9d5e1f6840af Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 16 Feb 2017 15:13:34 +0200 Subject: Add branch name to title of mails (Side branch scenario) Change-Id: Ia32b9172aaa74d1720b496830eee8c744866f28b Signed-off-by: Yaroslav Brustinov --- scripts/automation/regression/aggregate_results.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/automation/regression/aggregate_results.py b/scripts/automation/regression/aggregate_results.py index 130e0545..05bb001e 100755 --- a/scripts/automation/regression/aggregate_results.py +++ b/scripts/automation/regression/aggregate_results.py @@ -264,6 +264,7 @@ if __name__ == '__main__': build_id = os.environ.get('BUILD_ID') trex_repo = os.environ.get('TREX_CORE_REPO') last_commit_info_file = os.environ.get('LAST_COMMIT_INFO') + last_commit_branch_file = os.environ.get('LAST_COMMIT_BRANCH') python_ver = os.environ.get('PYTHON_VER') if not scenario: print('Warning: no environment variable SCENARIO, using default') @@ -289,6 +290,11 @@ if __name__ == '__main__': trex_info_dict[key_value[0].strip()] = key_value[1].strip() break + branch_name = '' + if last_commit_branch_file and os.path.exists(last_commit_branch_file): + with open(last_commit_branch_file) as f: + branch_name = f.read().strip() + trex_last_commit_info = '' trex_last_commit_hash = trex_info_dict.get('Git SHA') if last_commit_info_file and os.path.exists(last_commit_info_file): @@ -661,6 +667,8 @@ if __name__ == '__main__': # mail title mailtitle_output = scenario.capitalize() + if branch_name: + mailtitle_output += ' (%s)' % branch_name if build_id: mailtitle_output += ' - Build #%s' % build_id mailtitle_output += ' - %s!' % current_status -- cgit 1.2.3-korg