From: hyokeun Date: Tue, 4 Jul 2017 02:14:13 +0000 (+0900) Subject: Use OBS_package name on staging OBS project X-Git-Tag: submit/trunk/20190927.012743~394 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b6a554bdfb2edc7aedf90481e643c722b17248b;p=services%2Fjenkins-scripts.git Use OBS_package name on staging OBS project If OBS_package field exists in mapping file, use this instead of spec name. Change-Id: I4a7e0b62bc254a840c5d6d9171721df6e0636351 --- diff --git a/job_submitobs.py b/job_submitobs.py index 8b7e1f4..30ee169 100755 --- a/job_submitobs.py +++ b/job_submitobs.py @@ -458,9 +458,15 @@ def main(): url = 'ssh://%s:%s' % (os.getenv('GERRIT_HOSTNAME_EXTERNAL'), os.getenv('GERRIT_SSHPORT')) gerrit_project = os.getenv('GERRIT_PROJECT') + # get package name from xml files. + if obs_pkg: + package = obs_pkg + else: + #get package name from spec file name. + package = spec.name # create local package - print '\nCheckout %s/%s to local' % (obs_stg_prj, spec.name) - localpkg = obspkg.ObsPackage(tmpdir, obs_stg_prj, spec.name, \ + print '\nCheckout %s/%s to local' % (obs_stg_prj, package) + localpkg = obspkg.ObsPackage(tmpdir, obs_stg_prj, package, \ apiurl, apiuser, apipasswd) commit_msg = 'Submitter: %s <%s>\nComments: %s\nGit project: '\ '%s\nTag: %s\nCommit: %s %s' % (tagger['author'], \ @@ -469,7 +475,7 @@ def main(): # upload _service to obs try: upload_obs_service(url, gerrit_project, tag, - event['newrev'], obs_stg_prj, build, spec.name) + event['newrev'], obs_stg_prj, build, package) except UploadError, err: print err return 1