limit Koji build architectures

Fixes issue #869

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
This commit is contained in:
Valerij Maljulin
2018-10-16 12:36:34 +02:00
parent f28766ea13
commit 6b7ea33d18
3 changed files with 15 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ class BaseConfiguration(object):
KOJI_CONFIG = '/etc/module-build-service/koji.conf'
KOJI_PROFILE = 'koji'
ARCHES = ['i686', 'armv7hl', 'x86_64']
ALLOW_ARCH_OVERRIDE = False
KOJI_REPOSITORY_URL = 'https://kojipkgs.fedoraproject.org/repos'
KOJI_TAG_PREFIXES = ['module']
KOJI_ENABLE_CONTENT_GENERATOR = True

View File

@@ -755,9 +755,16 @@ chmod 644 %buildroot/etc/rpm/macros.zz-modules
else:
module_target = self.module_target['name']
build_opts = {"skip_tag": True,
"mbs_artifact_name": artifact_name,
"mbs_module_target": module_target}
build_opts = {
"skip_tag": True,
"mbs_artifact_name": artifact_name,
"mbs_module_target": module_target
}
# disabled by default, wouldn't work until Koji issue #1158 is done
if conf.allow_arch_override:
build_opts['arch_override'] = \
self.mmd.get_rpm_components()[artifact_name].get_arches().get()
task_id = self.koji_session.build(source, module_target, build_opts,
priority=self.build_priority)

View File

@@ -179,6 +179,10 @@ class Config(object):
'type': list,
'default': [],
'desc': 'Koji architectures.'},
'allow_arch_override': {
'type': bool,
'default': False,
'desc': 'Allow to support a custom architecture set'},
'koji_build_priority': {
'type': int,
'default': 10,