From: SungHun Hwang Date: Mon, 17 Apr 2017 05:25:18 +0000 (+0900) Subject: Add image status check code to avoid unnecessary testing process X-Git-Tag: submit/trunk/20190927.012743~485 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1ff7ca373016a152e6490d0ebbb8a3f000b2e03;p=services%2Fjenkins-scripts.git Add image status check code to avoid unnecessary testing process If any image fails then skip test trigger Change-Id: I93c6077a40f45219ca74d7c5600959854501a490 Signed-off-by: SungHun Hwang --- diff --git a/job_post_image.py b/job_post_image.py index 736e8b7..cd9a888 100755 --- a/job_post_image.py +++ b/job_post_image.py @@ -107,7 +107,18 @@ def main(): if after_update_img_cnt == target_img_cnt: print '[%s] reached the target_img_cnt(%s)!! trigger BUILD-MONITOR(Post_Image)\n' \ % (__file__, target_img_cnt) - trigger_next("TEST-TRIGGER-INFO-UPDATE", checkinfo) + + # check whether the image status is failed or not + skip_test_trigger = False + for each_item in checkinfo["images"]: + if each_item["status"] == "failed": + skip_test_trigger = True + print 'name:%s, status:%s' % (each_item["name"], each_item["status"]) + + if not skip_test_trigger: + trigger_next("TEST-TRIGGER-INFO-UPDATE", checkinfo) + else: + print 'skip_test_trigger!!\n' if buildmonitor_enabled: #buildmonitor.end_create_image_for_sr_stage(bm_start_datetime,