TPE-460 Disable git sync if SR sync is disabled 69/160969/1
authorhyokeun <hyokeun.jeon@samsung.com>
Tue, 21 Nov 2017 02:44:37 +0000 (11:44 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Tue, 21 Nov 2017 02:44:37 +0000 (11:44 +0900)
Change-Id: I60b36eddd29c4fed4834837bb0c8436bd96ad5d8

job_submit_request_sync.py

index 3512988..175ee27 100644 (file)
@@ -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)