Show build link(s) on buildContainer task page
Fixes: https://pagure.io/koji/issue/1529
This commit is contained in:
parent
cd54495c26
commit
97ca6fb106
2 changed files with 14 additions and 2 deletions
|
|
@ -666,15 +666,20 @@ def taskinfo(environ, taskID):
|
|||
elif task['method'] == 'restartVerify':
|
||||
values['rtask'] = server.getTaskInfo(params[0], request=True)
|
||||
|
||||
values['taskBuilds'] = []
|
||||
if task['state'] in (koji.TASK_STATES['CLOSED'], koji.TASK_STATES['FAILED']):
|
||||
try:
|
||||
result = server.getTaskResult(task['id'])
|
||||
values['result'] = result
|
||||
values['excClass'] = None
|
||||
except:
|
||||
excClass, exc = sys.exc_info()[:2]
|
||||
values['result'] = exc
|
||||
values['excClass'] = excClass
|
||||
if not values.get('result'):
|
||||
values['result'] = result
|
||||
values['excClass'] = None
|
||||
if task['method'] == 'buildContainer' and 'koji_builds' in result:
|
||||
values['taskBuilds'] = [
|
||||
server.getBuild(int(buildID)) for buildID in result['koji_builds']]
|
||||
else:
|
||||
values['result'] = None
|
||||
values['excClass'] = None
|
||||
|
|
|
|||
|
|
@ -314,6 +314,13 @@ $value
|
|||
<th>Build</th><td><a href="buildinfo?buildID=$taskBuild.build_id">$koji.buildLabel($taskBuild)</a></td>
|
||||
</tr>
|
||||
#end if
|
||||
#if $taskBuilds
|
||||
#for $build in $taskBuilds
|
||||
<tr>
|
||||
<th>Build</th><td><a href="buildinfo?buildID=$build.build_id">$koji.buildLabel($build)</a></td>
|
||||
</tr>
|
||||
#end for
|
||||
#end if
|
||||
<tr>
|
||||
<th>Created</th><td>$util.formatTimeLong($task.create_time)</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue