signed-repo kojiweb tweaks
This commit is contained in:
parent
76d8caf33b
commit
f1a45e0024
6 changed files with 28 additions and 17 deletions
|
|
@ -4928,7 +4928,7 @@ class NewSignedRepoTask(BaseTaskHandler):
|
|||
Methods = ['signedRepo']
|
||||
_taskWeight = 0.1
|
||||
|
||||
def handler(self, repo_id, tag):
|
||||
def handler(self, tag, repo_id):
|
||||
# TODO: remember to use an event here
|
||||
tinfo = self.session.getTag(tag, strict=True)
|
||||
kwargs = {}
|
||||
|
|
|
|||
|
|
@ -10181,7 +10181,7 @@ class RootExports(object):
|
|||
"""Create a signed-repo task. returns task id"""
|
||||
context.session.assertPerm('signed-repo')
|
||||
repo_id, event_id = signed_repo_init(tag, keys, task_opts)
|
||||
return make_task('signedRepo', [repo_id, tag], priority=15)
|
||||
return make_task('signedRepo', [tag, repo_id], priority=15)
|
||||
|
||||
def newRepo(self, tag, event=None, src=False, debuginfo=False):
|
||||
"""Create a newRepo task. returns task id"""
|
||||
|
|
|
|||
|
|
@ -2792,7 +2792,7 @@ def _taskLabel(taskInfo):
|
|||
if 'request' in taskInfo:
|
||||
build = taskInfo['request'][1]
|
||||
extra = buildLabel(build)
|
||||
elif method == 'newRepo':
|
||||
elif method in ('newRepo', 'signedRepo'):
|
||||
if 'request' in taskInfo:
|
||||
extra = str(taskInfo['request'][0])
|
||||
elif method in ('tagBuild', 'tagNotification'):
|
||||
|
|
@ -2803,7 +2803,7 @@ def _taskLabel(taskInfo):
|
|||
if 'request' in taskInfo:
|
||||
tagInfo = taskInfo['request'][0]
|
||||
extra = tagInfo['name']
|
||||
elif method == 'createrepo':
|
||||
elif method in ('createrepo', 'createsignedrepo'):
|
||||
if 'request' in taskInfo:
|
||||
arch = taskInfo['request'][1]
|
||||
extra = arch
|
||||
|
|
|
|||
|
|
@ -42,3 +42,8 @@ LiteralFooter = True
|
|||
# ToplevelTasks =
|
||||
# Tasks that can have children
|
||||
# ParentTasks =
|
||||
|
||||
# Uncommenting this will show python tracebacks in the webUI, but they are the
|
||||
# same as what you will see in apache's error_log.
|
||||
# Not for production use
|
||||
# PythonDebug = True
|
||||
|
|
|
|||
|
|
@ -431,6 +431,8 @@ _TASKS = ['build',
|
|||
'tagBuild',
|
||||
'newRepo',
|
||||
'createrepo',
|
||||
'signedRepo',
|
||||
'createsignedrepo',
|
||||
'buildNotification',
|
||||
'tagNotification',
|
||||
'dependantTask',
|
||||
|
|
@ -444,9 +446,9 @@ _TASKS = ['build',
|
|||
'livemedia',
|
||||
'createLiveMedia']
|
||||
# Tasks that can exist without a parent
|
||||
_TOPLEVEL_TASKS = ['build', 'buildNotification', 'chainbuild', 'maven', 'chainmaven', 'wrapperRPM', 'winbuild', 'newRepo', 'tagBuild', 'tagNotification', 'waitrepo', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
_TOPLEVEL_TASKS = ['build', 'buildNotification', 'chainbuild', 'maven', 'chainmaven', 'wrapperRPM', 'winbuild', 'newRepo', 'signedRepo', 'tagBuild', 'tagNotification', 'waitrepo', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
# Tasks that can have children
|
||||
_PARENT_TASKS = ['build', 'chainbuild', 'maven', 'chainmaven', 'winbuild', 'newRepo', 'wrapperRPM', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
_PARENT_TASKS = ['build', 'chainbuild', 'maven', 'chainmaven', 'winbuild', 'newRepo', 'signedRepo', 'wrapperRPM', 'livecd', 'appliance', 'image', 'livemedia']
|
||||
|
||||
def tasks(environ, owner=None, state='active', view='tree', method='all', hostID=None, channelID=None, start=None, order='-id'):
|
||||
values = _initValues(environ, 'Tasks', 'tasks')
|
||||
|
|
@ -623,7 +625,7 @@ def taskinfo(environ, taskID):
|
|||
build = server.getBuild(params[1])
|
||||
values['destTag'] = destTag
|
||||
values['build'] = build
|
||||
elif task['method'] == 'newRepo':
|
||||
elif task['method'] in ('newRepo', 'signedRepo'):
|
||||
tag = server.getTag(params[0])
|
||||
values['tag'] = tag
|
||||
elif task['method'] == 'tagNotification':
|
||||
|
|
|
|||
|
|
@ -218,23 +218,27 @@ $value
|
|||
#if $len($params) > 2
|
||||
$printOpts($params[2])
|
||||
#end if
|
||||
#elif $task.method == 'newRepo'
|
||||
#elif $task.method in ('newRepo', 'signedRepo')
|
||||
<strong>Tag:</strong> <a href="taginfo?tagID=$tag.id">$tag.name</a><br/>
|
||||
#if $len($params) > 1
|
||||
$printOpts($params[1])
|
||||
#if $task.method == 'signedRepo'
|
||||
<strong>Repo ID:</strong> $params[1]<br/>
|
||||
#elif $len($params) > 1
|
||||
$printOpts($params[1])
|
||||
#end if
|
||||
#elif $task.method == 'prepRepo'
|
||||
<strong>Tag:</strong> <a href="taginfo?tagID=$params[0].id">$params[0].name</a>
|
||||
#elif $task.method == 'createrepo'
|
||||
#elif $task.method in ('createrepo', 'createsignedrepo')
|
||||
<strong>Repo ID:</strong> $params[0]<br/>
|
||||
<strong>Arch:</strong> $params[1]<br/>
|
||||
#set $oldrepo = $params[2]
|
||||
#if $oldrepo
|
||||
<strong>Old Repo ID:</strong> $oldrepo.id<br/>
|
||||
<strong>Old Repo Creation:</strong> $koji.formatTimeLong($oldrepo.creation_time)<br/>
|
||||
#if $len($params) > 2
|
||||
#set $oldrepo = $params[2]
|
||||
#if $oldrepo
|
||||
<strong>Old Repo ID:</strong> $oldrepo.id<br/>
|
||||
<strong>Old Repo Creation:</strong> $koji.formatTimeLong($oldrepo.creation_time)<br/>
|
||||
#end if
|
||||
#end if
|
||||
#if $len($params) > 3
|
||||
<strong>External Repos:</strong> $printValue(None, [ext['external_repo_name'] for ext in $params[3]])<br/>
|
||||
#if $len($params) > 3 and $params[3]
|
||||
<strong>External Repos:</strong> $printValue(None, [ext['external_repo_name'] for ext in $params[3]])<br/>
|
||||
#end if
|
||||
#elif $task.method == 'dependantTask'
|
||||
<strong>Dependant Tasks:</strong><br/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue