From 9d1faf7cf3626266b81197198978e7bf5e33cb2f Mon Sep 17 00:00:00 2001 From: hyokeun Date: Tue, 21 Nov 2017 11:44:37 +0900 Subject: [PATCH] TPE-460 Disable git sync if SR sync is disabled Change-Id: I60b36eddd29c4fed4834837bb0c8436bd96ad5d8 --- job_submit_request_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.7.4