mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-11-06 07:09:21 +08:00
Fix #109 - Use priority 10 (configurable) for Koji builds
This commit is contained in:
@@ -308,6 +308,8 @@ class KojiModuleBuilder(GenericBuilder):
|
||||
self.module_build_tag = None # string
|
||||
self.module_target = None # A koji target dict
|
||||
|
||||
self.build_priority = config.koji_build_priority
|
||||
|
||||
def __repr__(self):
|
||||
return "<KojiModuleBuilder module: %s, tag: %s>" % (
|
||||
self.module_str, self.tag_name)
|
||||
@@ -582,7 +584,8 @@ chmod 644 %buildroot/%_rpmconfigdir/macros.d/macros.modules
|
||||
self.koji_session.uploadWrapper(source, serverdir, callback=callback)
|
||||
source = "%s/%s" % (serverdir, os.path.basename(source))
|
||||
|
||||
task_id = self.koji_session.build(source, self.module_target['name'])
|
||||
task_id = self.koji_session.build(source, self.module_target['name'],
|
||||
priority=self.build_priority)
|
||||
log.info("submitted build of %s (task_id=%s), via %s" % (
|
||||
source, task_id, self))
|
||||
return task_id
|
||||
|
||||
@@ -60,6 +60,7 @@ class Config(object):
|
||||
self._koji_config = None
|
||||
self._koji_profile = None
|
||||
self._koji_arches = None
|
||||
self._koji_build_priority = 10
|
||||
self._koji_repository_url = None
|
||||
self._rpms_default_repository = ""
|
||||
self._rpms_allow_repository = False
|
||||
@@ -241,6 +242,16 @@ class Config(object):
|
||||
def koji_repository_url(self, s):
|
||||
self._koji_repository_url = str(s)
|
||||
|
||||
@property
|
||||
def koji_build_priority(self):
|
||||
return self._koji_build_priority
|
||||
|
||||
@koji_build_priority.setter
|
||||
def koji_build_priority(self, i):
|
||||
if not isinstance(i, int):
|
||||
raise TypeError("koji_build_priority needs to be an int")
|
||||
self._koji_build_priority = i
|
||||
|
||||
@property
|
||||
def scmurls(self):
|
||||
"""Allowed SCM URLs."""
|
||||
|
||||
Reference in New Issue
Block a user