Add -group suffix to the path
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 12 May 2014 10:07:04 +0000 (13:07 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Mon, 19 May 2014 08:14:46 +0000 (11:14 +0300)
To distinguish groups from simple prerelease projects let's add
-group suffix to project path.

This was requested by QA team as they may consider to test only
group images as they don't have enough capacity to test all submissions,
so they need a way to distinguish groups.

Change-Id: I6c5f6d87d5e6b7ee1a51c84407876b8513111fa8
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
repa/common.py
repa/group.py

index 51128e2..5f41030 100644 (file)
@@ -43,6 +43,8 @@ class RepaException(Exception):
 
 def get_project_by_name(obs, name, target):
     """Lookup for a project in OBS by submission or group name."""
+    if name.startswith('submitgroup/'):
+        name += '-group'
     projects = list(obs.get_projects('^%s%s:%s$' % (OBS_PROJECT_PREFIX, target,
                                                     name.replace('/', ':'))))
     if not projects:
index 506eb02..188d82e 100755 (executable)
@@ -97,7 +97,7 @@ def create_group_project(obs, submissions, meta, comment):
                                   timestamp)
     gmeta = {'name': name, 'obs_target_prj': target_prj,
              'submissions': submissions, 'comment': comment}
-    project = '%s%s:%s' % (OBS_PROJECT_PREFIX, str(target_prj),
+    project = '%s%s:%s-group' % (OBS_PROJECT_PREFIX, str(target_prj),
                            name.replace('/', ':'))
 
     saved = sys.stdout