debian-koji/www/kojiweb/buildinfo.chtml
2024-09-30 10:46:26 -04:00

269 lines
7.3 KiB
Text

#import koji
#import koji.util
#from pprint import pformat
#from kojiweb import util
#include "includes/header.chtml"
#set $nvrpath = $pathinfo.build($build)
<h4>Information for build <a href="buildinfo?buildID=$build.id">$koji.buildLabel($build)</a></h4>
<table>
<tr>
<th>ID</th><td>$build.id</td>
</tr>
<tr>
<th>Package Name</th><td><a href="packageinfo?packageID=$build.package_id">$build.package_name</a></td>
</tr>
<tr>
<th>Version</th><td>$build.version</td>
</tr>
<tr>
<th>Release</th><td>$build.release</td>
</tr>
<tr>
<th>Epoch</th><td>$build.epoch</td>
</tr>
#if $build.draft
<th>Draft</th><td>True</td>
#else
<th>Draft</th><td>False</td>
#end if
#if $build.get('source')
<tr>
<th>Source</th><td>$build['source']</td>
</tr>
#end if
#if 'maven' in $typeinfo
<tr>
<th>Maven&nbsp;groupId</th><td>$typeinfo.maven.group_id</td>
</tr>
<tr>
<th>Maven&nbsp;artifactId</th><td>$typeinfo.maven.artifact_id</td>
</tr>
<tr>
<th>Maven&nbsp;version</th><td>$typeinfo.maven.version</td>
</tr>
#end if
#if 'module' in $typeinfo
#if $module_id
<tr>
<th>Module&nbsp;ID</th>
#if $mbs_web_url
<td><a href="$mbs_web_url/module/$module_id">$module_id</a></td>
#else
<td>$module_id</td>
#end if
</tr>
#end if
#if $module_tag
<tr>
<th>Module&nbsp;Tag</th><td><a href="taginfo?tagID=$module_tag.id">$module_tag.name</a></td>
</tr>
#end if
#end if
#if $summary
<tr>
<th>Summary</th><td class="rpmheader">$summary</td>
</tr>
#end if
#if $description
<tr>
<th>Description</th><td class="rpmheader">$description</td>
</tr>
#end if
#if $vcs
<tr>
<th><label title="Package source code VCS location">VCS</label></th><td>$util.formatLink($vcs)</td>
</tr>
#end if
#if $disturl
<tr>
<th>DistURL</th><td>$util.formatLink($disturl)</td>
</tr>
#end if
<tr>
<th>Built by</th><td><a href="userinfo?userID=$build.owner_id">$build.owner_name</a></td>
</tr>
<tr>
#set $stateName = $util.stateName($build.state)
<th>State</th>
<td class="$stateName">$stateName
#if $build.state == $koji.BUILD_STATES.BUILDING
#if $currentUser and ('admin' in $perms or $build.owner_id == $currentUser.id)
<span class="adminLink">(<a href="cancelbuild?buildID=$build.id$util.authToken($self)">cancel</a>)</span>
#end if
#end if
</td>
</tr>
<tr>
<th>Volume</th>
<td>$build.volume_name</td>
</tr>
<tr>
<th>Started</th><td>$util.formatTimeLong($start_ts)</td>
</tr>
#if $build.state == $koji.BUILD_STATES.BUILDING
#if $estCompletion
<tr>
<th>Est. Completion</th><td>$util.formatTimeLong($estCompletion)</td>
</tr>
#end if
#else
<tr>
<th>Completed</th><td>$util.formatTimeLong($build.completion_ts)</td>
</tr>
#end if
#if $build.promotion_ts
<tr>
<th>Promoted</th><td>$util.formatTimeLong($build.promotion_ts)</td>
</tr>
<tr>
<th>Promoted by</th><td><a href="userinfo?userID=$build.promoter_id">$build.promoter_name</a></td>
</tr>
#end if
#if $build.cg_id
<tr>
<th>Content generator</th><td>$build.cg_name</td>
</tr>
#end if
#if $task
<tr>
<th>Task</th><td><a href="taskinfo?taskID=$task.id" class="task$util.taskState($task.state)">$koji.taskLabel($task)</a></td>
</tr>
#end if
#if $build.get('extra')
<tr>
<th>Extra</th><td class="usertext">$pformat($build.extra)</td>
</tr>
#end if
<tr>
<th>Tags</th>
<td class="container">
#if $len($tags) > 0
<table class="nested">
#for $tag in $tags
<tr>
<td><a href="taginfo?tagID=$tag.id">$tag.name</a></td>
</tr>
#end for
</table>
#else
No tags
#end if
</td>
</tr>
<tr>
<th>RPMs</th>
<td class="container">
#if $len($rpmsByArch) > 0
<table class="nested">
#if 'src' in $rpmsByArch
<tr><th>src</th><th></th></tr>
#for $rpm in $rpmsByArch['src']
#set $rpmfile = '%(name)s-%(version)s-%(release)s.%(arch)s.rpm' % $rpm
#set $rpmpath = $pathinfo.rpm($rpm)
<tr>
<td></td>
#if $rpm.metadata_only
<td>$rpmfile (<a href="rpminfo?rpmID=$rpm.id">info</a>) (metadata only)</td>
#elif $build.state == $koji.BUILD_STATES.DELETED
<td>$rpmfile (<a href="rpminfo?rpmID=$rpm.id">info</a>)
#else
<td>$rpmfile (<a href="rpminfo?rpmID=$rpm.id">info</a>) (<a href="$nvrpath/$rpmpath">download</a>)</td>
#end if
</tr>
#end for
#end if
#set $arches = $rpmsByArch.keys()
#for $arch in sorted($arches)
#if $arch == 'src'
#silent continue
#end if
<tr>
<th>$arch</th>
</tr>
#for $rpm in $rpmsByArch[$arch]
<tr>
#set $rpmfile = '%(name)s-%(version)s-%(release)s.%(arch)s.rpm' % $rpm
#set $rpmpath = $pathinfo.rpm($rpm)
<td></td>
<td>
#if $build.state != $koji.BUILD_STATES.DELETED
$rpmfile (<a href="rpminfo?rpmID=$rpm.id">info</a>) (<a href="$nvrpath/$rpmpath">download</a>)
#else
$rpmfile (<a href="rpminfo?rpmID=$rpm.id">info</a>)
#end if
</td>
</tr>
#end for
#end for
</table>
#else
No RPMs
#end if
</td>
</tr>
#for btype in $archiveIndex
#set $archivesByExt = $archiveIndex[btype]
#if not $archivesByExt
#continue
#end if
<tr>
<th>$btype.capitalize() Archives</th>
<td class="container">
<table class="nested">
#set $exts = $archivesByExt.keys()
#for ext in $exts
<tr>
<th>$ext</th>
</tr>
#for $archive in $archivesByExt[$ext]
<tr>
<td/>
<td>
#if $archive.metadata_only or $build.state == $koji.BUILD_STATES.DELETED
$archive.display (<a href="archiveinfo?archiveID=$archive.id">info</a>)
#else
$archive.display (<a href="archiveinfo?archiveID=$archive.id">info</a>) (<a href="$archive.dl_url">download</a>)
#end if
</td>
</tr>
#end for
#end for
</table>
</td>
</tr>
#end for
#if $logs_by_dir
<tr>
<th>Logs</th>
<td class="container">
<table class="nested">
#set $logdirs = $logs_by_dir.keys()
#for logdir in $logdirs
<tr>
<th>$logdir</th>
</tr>
#for loginfo in $logs_by_dir[$logdir]
<tr>
<td/>
<td>
<a href="$loginfo.dl_url">$loginfo.name</a>
</td>
</tr>
#end for
#end for
</table>
</td>
</tr>
#end if
#if $changelog
<tr>
<th>Changelog</th>
<td class="changelog">$koji.util.formatChangelog($changelog)</td>
</tr>
#end if
</table>
#include "includes/footer.chtml"