From: hyokeun Date: Tue, 21 Nov 2017 02:44:37 +0000 (+0900) Subject: TPE-460 Disable git sync if SR sync is disabled X-Git-Tag: submit/trunk/20190927.012743~239^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F160969%2F1;p=services%2Fjenkins-scripts.git TPE-460 Disable git sync if SR sync is disabled Change-Id: I60b36eddd29c4fed4834837bb0c8436bd96ad5d8 --- diff --git a/job_submit_request_sync.py b/job_submit_request_sync.py index 3512988..175ee27 100644 --- a/job_submit_request_sync.py +++ b/job_submit_request_sync.py @@ -294,6 +294,7 @@ def main(): # Split request into smaller part split_step = 100 for r in xrange(0, len(requests_item[project_to_create]), split_step): + if target.get('sr-sync') != 'Yes': continue trigger_next('PRE_RELEASE_REQUEST_%s_%d' % (target['target'], (r/split_step)+1), \ {'requests': [{project_to_create: requests_item[project_to_create][r:(r+split_step)]}], \ 'obs_target_prj': project, \ @@ -303,7 +304,6 @@ def main(): 'snapshot': snapshot, 'index_sequence': '%d-%d' % ((r/split_step)+1, len(requests_item[project_to_create]))}) - if target.get('sr-sync') != 'Yes': continue for file_name in os.listdir(os.getenv('WORKSPACE')): full_path = os.path.join(os.getenv('WORKSPACE'), file_name) dest_path = os.path.join(os.getenv('WORKSPACE'), 'SR_SYNC_' + file_name)