From b3dbcae35e07fc38b6bf9ce21e7eb2e74629e06b Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Tue, 25 Jun 2013 16:29:11 +0800 Subject: [PATCH] Add buildcheck project name check Check whether this repo publish event is from build check project at the beginning. If not, exit directly. Change-Id: I9c5973a3b426f294ac7697e6ea76d8b4a3e013cf Signed-off-by: Lin Yang --- job_buildcheck_post.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/job_buildcheck_post.py b/job_buildcheck_post.py index beeb4be..67d3e48 100755 --- a/job_buildcheck_post.py +++ b/job_buildcheck_post.py @@ -40,6 +40,12 @@ def main(): event_dict = trigger_info(os.getenv('TRIGGER_INFO')) + # check whether this is buildcheck project + if ':buildcheck:' not in event_dict['project']: + print 'This project %s is not buildcheck project, exit now' \ + % event_dict['project'] + return end(tmpdir) + if event_dict['type'] == 'OBS_REPO_PUBLISH_STATE' and \ event_dict['state'] != 'published': print 'repo is publishing, exit now' -- 2.7.4