From: hyokeun Date: Wed, 30 Aug 2017 06:25:14 +0000 (+0900) Subject: TPE-285 Split SR-Sync trigger data into smaller part X-Git-Tag: submit/trunk/20190927.012743~304^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6fb191b18c8c882b503cfe54b27297f6d28fd03;p=services%2Fjenkins-scripts.git TPE-285 Split SR-Sync trigger data into smaller part Change-Id: I3b94d07c99d81eb5bd31a320447eb9327ef67e07 --- diff --git a/job_submit_request_sync.py b/job_submit_request_sync.py index a6ca27a..a97ddd2 100644 --- a/job_submit_request_sync.py +++ b/job_submit_request_sync.py @@ -250,9 +250,11 @@ def main(): 'gerrit_project': git, \ 'snapshot': sn}) - if True: #os.getenv('label') == 'SR-SYNC': - trigger_next('PRE_RELEASE_REQUEST_%s' % target['target'], \ - {'requests': [requests_item], \ + # Split request into smaller part + split_step = 100 + for r in xrange(0, len(requests_item[project_to_create]), split_step): + trigger_next('PRE_RELEASE_REQUEST_%s_%d' % (target['target'], r), \ + {'requests': [{project_to_create: requests_item[project_to_create][r:(r+split_step)]}], \ 'obs_target_prj': project, \ 'url': git_url, \ 'obs_dest_prj': target['target'], \ @@ -268,7 +270,7 @@ def main(): "submit_date" : str(bm_end_datetime), "submit_msg" : "N/A", "submitter" : "", - "bm_member_sr_info" : requests_item, + "bm_member_sr_info" : {project_to_create: requests_item[project_to_create][r:(r+split_step)]}, "bm_sync_git_tag" : bm_sync_git_tag, "gerrit_project" : "N/A", "gerrit_newrev" : "N/A", @@ -277,7 +279,7 @@ def main(): "bm_end_datetime": str(bm_end_datetime), "bm_src_project_lst": [project_to_create], } - trigger_next("BUILD-MONITOR_%s" % bm_stage, bm_data) + trigger_next("BUILD-MONITOR_%s_%d" % (bm_stage, r), bm_data) if __name__ == '__main__': sys.exit(main())