From: Lin Yang Date: Fri, 7 Dec 2012 04:01:19 +0000 (+0800) Subject: give warning for multiply specfile under packaging X-Git-Tag: 0.12~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=edd878aa89f06d467a8ae2adaac27c2b6dc79f48;p=services%2Fjenkins-scripts.git give warning for multiply specfile under packaging Change-Id: I5689a1fbd0744837d30cdfdd81b869960069af93 Signed-off-by: Lin Yang --- diff --git a/job_policycheck.py b/job_policycheck.py index 0f3d2e5..2115991 100755 --- a/job_policycheck.py +++ b/job_policycheck.py @@ -137,7 +137,9 @@ if __name__ == '__main__': else: specfile = utils.find_spec('%s/%s' % (prjdir, packagingdir)) if not specfile: - specfile = '%s/%s/%s.spec' % (prjdir, packagingdir, prj) + msg = "[ERROR]: Packaging directory contains multiply spec files, backend service can not decide which spec file to use. Please use OBS_PACKAGE parameter in scm/git-obs-mapping project to specify the target spec file or contact system administrator for more details." + mygerrit.review(commit = GERRIT_PATCHSET_REVISION, message = msg) + continue print('specfile %s' % specfile) # build the package under home project of backend service user @@ -149,7 +151,7 @@ if __name__ == '__main__': print 'submit this change to OBS for build check...' temp_build = TempPackageBuild(OBS_API_URL, OBS_OSCRC_PATH, buildcheck_project, spec.name) if 'NoRepo' == temp_build.remote_build(obs_dest_prj, prjdir, 'GIT_PROJECT: %s\nCOMMIT_ID: %s\nOWNER_EMAIL: %s' % (GERRIT_PROJECT, GERRIT_PATCHSET_REVISION, GERRIT_CHANGE_OWNER_EMAIL)): - msg = "[BUILD CHECK RESULT] Can not test build against to project %s, which currently has no build targets defined. Please contact the build systerm administrator." %(obs_dest_prj) + msg = "[BUILD CHECK RESULT] Can not test build against to project %s, which currently has no build targets defined. Please contact the build system administrator." %(obs_dest_prj) mygerrit.review(commit = GERRIT_PATCHSET_REVISION, message = msg) except Exception, err: print '%s' % err