From: ZhuoX Li Date: Tue, 24 Jun 2014 02:53:55 +0000 (+0800) Subject: Add 'unknown' state into the filter regular of generating snapshot. X-Git-Tag: 1.0~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2065ea40bfbd1ebd9288a0a42126e10fa5a52c5;p=services%2Fjenkins-scripts.git Add 'unknown' state into the filter regular of generating snapshot. When some targets of OBS project are disabled, maybe get the 'unknown' status, we also should ignore it ,to create snapshot/prerelease repos. Change-Id: I1caa47b31e2d82043a5dd25ffbd953901dad90ab --- diff --git a/job_create_snapshot.py b/job_create_snapshot.py index 169859b..5ab3cde 100755 --- a/job_create_snapshot.py +++ b/job_create_snapshot.py @@ -152,9 +152,9 @@ def main(): # them not published repo_status = build.get_repo_state(project) for target_arch, status in repo_status.items(): - if status not in ['published', 'unpublished']: - print "The project: %s target: %s repo isn't published yet" \ - % (project, target_arch) + if status not in ['published', 'unpublished', 'unknown']: + print "The project: %s target: %s repo is still under %s, " \ + "skip now" % (project, target_arch, status) return 0 diff --git a/job_pre_release_obs.py b/job_pre_release_obs.py index b95dae3..929f322 100755 --- a/job_pre_release_obs.py +++ b/job_pre_release_obs.py @@ -244,10 +244,10 @@ def main(action): # them not published repo_status = build.get_repo_state(project) for target_arch, status in repo_status.items(): - if status not in ['published', 'unpublished']: + if status not in ['published', 'unpublished', 'unknown']: print "Skipping prerelease repository creation as OBS "\ - "repository: %s/%s/%s is't published yet." \ - % (project, repo, target_arch) + "repository: %s/%s/%s is still under %s, skip now." \ + % (project, repo, target_arch, status) return 0