Add TRIGGER_INFO string to add_git_tag 10/246010/1 submit/trunk/20201029.114030 submit/trunk/20201029.132130 submit/trunk/20201029.140230
authorYonghee Han <onstudy@samsung.com>
Thu, 22 Oct 2020 03:58:55 +0000 (12:58 +0900)
committerYonghee Han <onstudy@samsung.com>
Thu, 22 Oct 2020 03:58:55 +0000 (12:58 +0900)
Change-Id: I9c9c4f546e21ce46e7a30a0a5b045c64367d2d5a

job_add_git_tag.py

index 2786dcd..646177f 100644 (file)
@@ -65,8 +65,11 @@ def main():
     gerrit_newrev = os.getenv("GERRIT_NEWREV")
     gerrit_account_name = os.getenv("GERRIT_EVENT_ACCOUNT_NAME")
     gerrit_account_email = os.getenv("GERRIT_EVENT_ACCOUNT_EMAIL")
-  
-    event = get_gerrit_event()
+    if os.getenv('TRIGGER_INFO'):
+        event = trigger_info(os.getenv('TRIGGER_INFO'))
+        os.environ["GERRIT_SR_SUBMIT_LOG_ID"] = event.get("sr_submit_log_id")
+    else:
+        event = get_gerrit_event()
 
     # Init backend database
     redis_host = os.getenv("REDIS_HOST")