RBS - Creating MDE related rootstraps for 5.0 30/172430/1
authorhyokeun <hyokeun.jeon@samsung.com>
Wed, 14 Mar 2018 03:06:14 +0000 (12:06 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Wed, 14 Mar 2018 03:06:14 +0000 (12:06 +0900)
Change-Id: Ie363dc6da98b1bcbb7169025fc1f78bac4aa25e3

job_create_sdkrootstrap.py

index f01a8f2..d881f49 100755 (executable)
@@ -75,7 +75,8 @@ profiles = [
              'git_rs_prj': 'sdk/tools/sdk-image',
              'public_cmd': 'rs_rbs_public',
              'private_cmd': 'rs_rbs_private',
-             'git_branch': 'platform_5.0'},
+             'git_branch': 'platform_5.0',
+             'misc_branches': ['tizen_mde']},
             {'name': '4.0-unified',
              'project': 'Tizen:4.0:Unified',
              'base_url': os.getenv('RBS_BASE_URL'),
@@ -336,13 +337,16 @@ def make_rs_snapshot_private(git_prj, git_cache, mygit, fields, profile, vm_imag
 
     return status
 
-def make_rs_snapshot_public(git_prj, git_cache, mygit, fields, profile, vm_image):
+def make_rs_snapshot_public(git_prj, git_cache, mygit, fields, profile, vm_image, specific_branch=None):
     """
     Make Rootstrap snapshot(public api)
     """
 
     # checkout branch
-    git_branch = profile['git_branch']
+    if specific_branch is not None:
+        git_branch = specific_branch
+    else:
+        git_branch = profile['git_branch']
     mygit.checkout(git_branch)
 
     rs = os.path.join(git_cache, git_prj, 'make_'+profile['public_cmd']+'.sh')
@@ -544,6 +548,13 @@ def main():
     #### Make Rootstrap Snapshot (PUBLIC)####
     status = make_rs_snapshot_public(git_prj, git_cache, mygit, fields, profile, vm_image)
 
+    #### Misc public rootstraps ####
+    if profile.get('misc_branches'):
+        for mb in profile.get('misc_branches'):
+            status_1 = make_rs_snapshot_public(git_prj, git_cache, mygit, fields, profile, vm_image, specific_branch=mb)
+            if status_1 != 'succeeded':
+                status = status_1
+
     if status == 'succeeded':
         print "The RBS(Public) build was successful."
     else: