Add a "Fail" string for the failure case 46/212746/2
authorYonghee Han <onstudy@samsung.com>
Mon, 26 Aug 2019 10:35:26 +0000 (19:35 +0900)
committerYonghee Han <onstudy@samsung.com>
Mon, 26 Aug 2019 10:39:29 +0000 (19:39 +0900)
When Auto Git-sync is failed

Change-Id: I6511cc711743b579f2c4a9d6810f5cad81d6b0ed

job_submit_request_git_sync.py

index 60d26d8..70ed4c6 100644 (file)
@@ -372,8 +372,14 @@ def update_sync_for_git_sync(tmpdir, private_gerrit, target, requests, request_s
     if True:
         ### Init MailSender ####
         my_mail = MailSender()
-
-        my_mail.add_title('[Auto Git-Sync] Target Project:%s Branch:%s' %(target_project, branch))
+        if upstream_failures or \
+           overwrite_failures or \
+           merge_failures or \
+           submit_failures or \
+           submit_request_failures:
+            my_mail.add_title('[Auto Git-Sync Fail] Target Project:%s Branch:%s' %(target_project, branch))
+        else:
+            my_mail.add_title('[Auto Git-Sync] Target Project:%s Branch:%s' %(target_project, branch))
         my_mail.add_message('Hello\n A Build System inform you about Auto Git-Sync results\n\n')
         my_mail.add_message('Public Source Snapshot: %s \nUpstream Branch: %s\nTarget Project: %s\nTarget Branch: %s' \
                             %(request_snapshot, UPSTREAM_BRANCH, target_project, branch))