Add 'unknown' state into the filter regular of generating snapshot.
authorZhuoX Li <zhuox.li@intel.com>
Tue, 24 Jun 2014 02:53:55 +0000 (10:53 +0800)
committerLin Yang <lin.a.yang@intel.com>
Mon, 7 Jul 2014 09:02:53 +0000 (17:02 +0800)
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

job_create_snapshot.py
job_pre_release_obs.py

index 169859b..5ab3cde 100755 (executable)
@@ -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
 
index b95dae3..929f322 100755 (executable)
@@ -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