initial import

This commit is contained in:
Christian Kellner 2020-08-25 19:55:39 +02:00
commit aefe1218b5
19 changed files with 467 additions and 0 deletions

21
plugins/hub/osbuild.py Normal file
View file

@ -0,0 +1,21 @@
import sys
import logging
import koji
from koji.context import context
sys.path.insert(0, "/usr/share/koji-hub/")
import kojihub
@koji.plugin.export
def osbuildImageTest(name, version, arches, target, opts=None, priority=None):
"""Create an image via osbuild"""
context.session.assertPerm("image")
args = [name, version, arches, target, opts]
task = {"channel": "image"}
if priority and priority < 0 and not context.session.hasPerm('admin'):
raise koji.ActionNotAllowed('only admins may create high-priority tasks')
return kojihub.make_task('osbuildImage', args, **task)