k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/gubernator/templates/build.html (about)

     1  % extends 'base.html'
     2  {% block title %}{{job}} #{{build}} Results{% endblock %}
     3  % block head
     4  {{super()}}
     5  % if not finished
     6  <link rel="icon" type="image/png" href="{{'favicon-yellow.png'|static}}" />
     7  % elif finished and finished['passed'] and not res['failed']
     8  <link rel="icon" type="image/png" href="{{'favicon-green.png'|static}}" />
     9  % endif
    10  % endblock
    11  % block banner
    12  % if spyglass_link
    13  <div id="page-top-banner">
    14  	This job view page is being replaced by Spyglass soon. <a href="{{spyglass_link}}">Check out the new job view</a>.
    15  </div>
    16  % endif
    17  % endblock
    18  % block header
    19  <h1>{% if pr and pr != "batch"  %}<a href="/pr/{{pr_path}}{{pr}}">{% if repo != "kubernetes/kubernetes"%}{{repo}} {% endif %}PR #{{pr}}</a> {% endif %}
    20  	% if testgrid_query
    21  		<a href="{{testgrid_query|tg_url}}">{{job}}</a>
    22  	% else
    23  		{{job}}
    24  	% endif
    25  	#{{build}}</h1>
    26  	<p><a href="/builds{{job_dir}}">Recent runs</a>
    27  	% if spyglass_link
    28  	|| <a href="{{spyglass_link}}">View in Spyglass</a>
    29  	% endif
    30  	</p><br>
    31  % endblock
    32  % block content
    33  <div id="summary">
    34  	<table class="build-meta">
    35  	% if pr and pr_digest
    36  		% set pl = pr_digest.payload
    37  		<tr><td>PR<td><a href="/pr/{{pl['author']}}">{{pl['author']}}</a>: {{pl['title']}}
    38  	% endif
    39  		% if finished
    40  			% set result = finished['result']
    41  		% else
    42  			% set result = 'Not Finished'
    43  		% endif
    44  		<tr><td>Result<td><span class="build-{{result | slugify}}">{{result}}</span>
    45  	% if started
    46  		% if finished
    47  			<tr><td>Tests<td>
    48  			% if res['failed']
    49  				<span class="text-failure">{{res['failed']|length}} failed</span>
    50  			% else
    51  				{{res['failed']|length}} failed
    52  			% endif
    53  			/ {{res['passed']|length}} succeeded
    54  		% endif
    55  		<tr><td>Started<td>{{started['timestamp']|timestamp}}
    56  		{% if finished %}<tr><td>Elapsed<td>{{(finished['timestamp']-started['timestamp'])|duration}}{% endif %}
    57  		<tr><td>Revision<td><a href="https://github.com/{{repo}}/commit/{{commit}}">{{started['revision'] or finished['revision']}}</a>
    58  		% if 'node' in started
    59  			<tr><td>Builder<td>{{started['node']}}
    60  		% endif
    61  		% if refs
    62  			<tr><td>Refs<td>
    63  			% for name, sha in refs
    64  				{%- if name.isdigit() -%}
    65  					<a href="https://github.com/{{repo}}/pull/{{name}}">{{name}}</a>
    66  				{%- else -%}
    67  					{{name}}
    68  				{%- endif -%}
    69  				{%- if sha %}:{{sha|github_commit_link(repo)}}{% endif %}<br>
    70  			{%- endfor %}
    71  		% endif
    72  		% if 'metadata' in started
    73  			% for k, v in started['metadata']|dictsort
    74  			<tr><td>{{k}}<td>{{v|maybe_linkify}}
    75  			% endfor
    76  		% endif
    77  		% if finished and 'metadata' in finished and finished['metadata']
    78  			% for k, v in finished['metadata']|dictsort
    79  			<tr><td>{{k}}<td>{{v|maybe_linkify}}
    80  			% endfor
    81  		% endif
    82  	% endif
    83  	</table>
    84  	<ul class="nav">
    85  		<li class="nav"><a href="{{build_dir | gcs_browse_url}}">artifacts</a></li>
    86  		<li class="nav"><a href="?log#log">build log</a></li>
    87  	</ul>
    88  	</div>
    89  	<div id="failures">
    90  	% if issues
    91  		<h4>References</h4>
    92  		% for issue in issues
    93  		<a href="{{issue.url}}">
    94  		{% if issue.is_pr %}PR{% else %}Issue{% endif %} #{{issue.number}} {{issue.payload['title']}}</a>
    95  		<br>
    96  		% endfor
    97  		<hr>
    98  	% endif
    99  	% if res['failed']
   100  		<h2>Test Failures</h2>
   101  		% for name, time, text, filename, output in res['failed']
   102  			<hr>
   103  			<h3><a class="anchor" id="{{name|slugify}}" href="#{{name|slugify}}">{{name}}<span class="time"> {{time|duration}}</span></h3></a>
   104  			% if 'junit_runner' not in filename
   105  				<pre class="cmd" onclick="select(this)">{{name | testcmd}}</pre>
   106  			% endif
   107  			% if text
   108  				<pre class="error">{{text|linkify_stacktrace(commit, repo)}}
   109  				% if output
   110  				<div class="hidden"><hr>{{output|linkify_stacktrace(commit, repo)}}</div>
   111  				<span class="expand inset-expand">Click to see stdout/stderr</span><span class="inset-filename">from <a href="https://storage.googleapis.com{{filename}}">{{filename|basename}}</a></span></pre>
   112  				% else
   113  				<span class="inset-filename">from <a href="https://storage.googleapis.com{{filename}}">{{filename|basename}}</a></span></pre>
   114  				% endif
   115  				% set pod_name = text|parse_pod_name
   116  				% if pod_name
   117  					<p>Find <tt>{{pod_name}}</tt> mentions in <a id="{{pod_name|slugify}}" href="/build{{build_dir}}/nodelog?pod={{pod_name}}&junit={{filename|basename}}&wrap=on">log files</a>
   118  				% else
   119  					<p>Filter through <a href="/build{{build_dir}}/nodelog?junit={{filename|basename}}&wrap=on">log files</a>
   120  				% endif
   121  				% if testgrid_query
   122  					| View <a href="{{testgrid_query|tg_url(name)}}">test history</a> on testgrid
   123  				% endif
   124  			% else
   125  				<span class="inset-filename">from <a href="https://storage.googleapis.com{{filename}}">{{filename|basename}}</a></span>
   126  			% endif
   127  		% endfor
   128  	% else
   129  		<h2>{{"No Test Failures!" if finished else "Build Still Running!"}}</h2>
   130  	% endif
   131  	</div>
   132  	% for kind in ['passed', 'skipped']
   133  		% if res[kind]
   134  			<hr>
   135  			<div id="{{kind}}" class="testlist">
   136  			<span class="expand">Show {{res[kind]|length}} {{kind|title}} Tests</span>
   137  			<h2 class="hidden">{{kind|title}}</h2>
   138  			% for name in res[kind]
   139  				<p class="hidden">{{name}}
   140  			% endfor
   141  			</div>
   142  		% endif
   143  	% endfor
   144  	% if build_log
   145  	<div id="log">
   146  		<a name="log"></a>
   147  		<hr>
   148  		<h2 id="log">Error lines from build-log.txt</h2>
   149  		<ul class="log">
   150  			<li class="log"><button onclick="javascript:expand_all(this.parentElement)">Expand Skipped Lines</button></li>
   151  			<li class="log"><a id="rawloglink" href="{{build_log_src or "https://storage.googleapis.com%s/build-log.txt" % build_dir}}">Raw build-log.txt</a></li>
   152  		</ul>
   153  		<pre data-src="{{build_log_src or "%s/build-log.txt" % build_dir}}">{{build_log | safe}}</pre>
   154  	</div>
   155  	% endif
   156  % endblock