Create ABS prerelease project on the public 22/118222/1
authorhyokeun <hyokeun.jeon@samsung.com>
Thu, 9 Mar 2017 08:15:12 +0000 (17:15 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Thu, 9 Mar 2017 08:15:16 +0000 (17:15 +0900)
AS-IS: ABS prerelease was created SPIN infra.
TO-BE: It will go through the same flow as other prereleases.

Change-Id: I27ff57cc07d6b8ccbed43cf96e98c0ad7f37f3b9

job_submit.py

index 3f1c665..3f6d3f0 100755 (executable)
@@ -604,7 +604,11 @@ def main(build_type):
     tagger = mygit.get_tag(tag)
 
     # get list of target projects from git-obs-mapping
-    obs_target_prjs = git_obs_map(os.getenv("GERRIT_PROJECT"), git_branch)
+    if git_branch.endswith('_tpk'): # ABS - mappings w/o _tpk postfix(only for profiles).
+        obs_target_prjs = git_obs_map(os.getenv("GERRIT_PROJECT"), git_branch.split('_tpk')[0])
+    else:
+        obs_target_prjs = git_obs_map(os.getenv("GERRIT_PROJECT"), git_branch)
+
     build = BuildService(obs_api, obs_user, obs_passwd)
 
     # prepare submit_info
@@ -650,7 +654,9 @@ def main(build_type):
         print 'package name = %s' %(package)
 
         if build_type == 'prerelease':
-            if obs_stg_prj != 'prerelease':
+            if obs_stg_prj == 'abs' and git_branch.endswith('_tpk'):
+                print 'Create ABS prerelease project...'
+            elif obs_stg_prj != 'prerelease':
                 print "%s is not 'prerelease' project in git-obs-mapping.xml." \
                       "It has been switched to submitobs workflow." \
                       "Skipping ..." % obs_stg_prj