Fix URLs from http to https where possible
[buildfarm-server.git] / templates / log.tt
index 07699b01900ee435bc50d868d288bf71c5644c5e..8a769450ead59044d56b97e7280eb905d4ca858f 100644 (file)
@@ -7,7 +7,7 @@ See accompanying License file for license details
 -%]
 [% PERL %]
        use POSIX qw(ceil);
-        my $lrfactor = 6;
+        my $lrfactor = 4;
        $stash->set(lrfactor => $lrfactor);
         my $rows = $stash->get('log_file_names'); 
        my $logrows = ceil(scalar(@$rows)/$lrfactor);
@@ -15,10 +15,10 @@ See accompanying License file for license details
        $stash->set( logcells => $logcells);
        $stash->set( logrows => $logrows ); 
 [% END -%]
-[% mytitle = BLOCK %]PostgreSQL BuildFarm | [% IF stage != 'OK' %]Log for system "[% system %]" failure on snapshot taken [% urldt ; ELSE %]Configuration summary for system "[% system %]" snapshot taken [% urldt ; END ; END -%]
+[% mytitle = BLOCK %]Exim BuildFarm | [% IF stage != 'OK' %]Log for system "[% system %]" failure on snapshot taken [% urldt ; ELSE %]Configuration summary for system "[% system %]" snapshot taken [% urldt ; END ; END -%]
 [%
         cvsurl = 'http://anoncvs.postgresql.org/cvsweb.cgi';
-        giturl = scmurl || 'http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=';
+        giturl = scmurl || 'https://git.exim.org/gitweb?p=exim.git;a=commit;h=';
 -%]
 [% WRAPPER 'page.tt' 
        title = mytitle
@@ -26,20 +26,13 @@ See accompanying License file for license details
        pagebutton = 'none'
 %]
 [%- BLOCK gitlog ;
-       loglines = clog.split('\n');
-       firstline = loglines.shift;
-       commitref = firstline.replace('commit ([0-9A-Fa-f]+)','$1');
-%]
-<!--
-git_head_ref [% git_head_ref %]
-last_build_git_ref [% last_build_git_ref %]
-last_success_git_ref [% last_success_git_ref %]
--->
-commit <a href="[% giturl ; commitref %]">[% commitref %]</a>
-[% loglines.join("\n")  | html %]
+       commitref = clog.replace('^commit ([0-9A-Fa-f]+)(.|\n)*','$1');
+       logtail = clog.replace('^commit ([0-9A-Fa-f]+)','');
+       logtail = logtail.replace('\n',' ');
 
+%]<a href="[% giturl ; commitref %]">[% commitref %]</a>[% logtail | html %]
 [% END -%]
-<h1>PostgreSQL Build Farm Log</h1>
+<h1>Exim Build Farm Log</h1>
 <h2>Details for system "[% system %]"[% IF stage != 'OK' %] failure at stage [% stage ; ELSE %], status 'OK'[% END %], snapshot taken [% urldt %]</h2>
 <table cellspacing="0">
     <tr>
@@ -76,10 +69,10 @@ commit <a href="[% giturl ; commitref %]">[% commitref %]</a>
 [% END %]
 [% cell = 0; FOREACH logstage  IN log_file_names ; striplog = logstage.replace('\.log$','') ; cell = loop.count %]
   [% IF loop.first %] 
-    <br /> <table><tr><th class='head' rowspan='[% logrows %]'>Stage Logs</th>
+    <br /> <table><tr><th class='head' rowspan='[% logrows %]'>Stage Logs<br /><br />Total run time<br />[% run_time %]</th>
   [% END %]
     [% IF loop.count > 1 and loop.count % lrfactor == 1 %]<tr>[% END %]
-    <td><a href='show_stage_log.pl?nm=[% system %]&amp;dt=[% urldt | uri %]&amp;stg=[% striplog %]'>[% striplog %]</a></td>
+    <td><a href='show_stage_log.pl?nm=[% system %]&amp;dt=[% urldt | uri %]&amp;stg=[% striplog %]'>[% striplog %]</a> ([% stage_times.$logstage.stage_duration %])</td>
     [% IF loop.count % lrfactor == 0 %]</tr>[% END %]
 [% END %]
 
@@ -95,6 +88,9 @@ commit <a href="[% giturl ; commitref %]">[% commitref %]</a>
 <pre>
 [% conf | html %]
 </pre>
+<table>
+<tr>
+<td valign="top">
 <h3>Files changed this run</h3>
 [%- IF changed_this_run.0 -%]
 <pre>
@@ -103,21 +99,27 @@ commit <a href="[% giturl ; commitref %]">[% commitref %]</a>
 [%- END -%]
 </pre>
 [% END %]
+</td>
+<td valign="top" style="padding-left: 10pt;">
 [% IF changed_this_run_logs.0 %]
 <h5>Git log</h5>
-<blockquote><pre>
-[%- FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
-[%IF not loop.last %]
-===================================================================
-[% END -%]
+<pre>
+[% IF last_build_git_ref && git_head_ref %]
+<a href="https://github.com/Exim/exim/compare/[% last_build_git_ref %]...[% git_head_ref %]">Change Set for this build</a>
+[% END %]
+[% FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
 [%- END -%]
-</pre></blockquote>
+</pre>
+</td>
 [%- ELSE %]
-<pre>
 not recorded
 </pre>
+</td>
 [% END -%]
+</tr>
 [% IF stage != 'OK' %]
+<tr>
+<td valign="top">
 <h3>Files changed since last success</h3>
 [%- IF changed_since_success.0 %]
 <pre>
@@ -126,21 +128,28 @@ not recorded
 [%- END -%]
 </pre>
 [% END %]
+</td>
+<td valign="top" style="padding-left: 10pt;">
 [% IF changed_since_success_logs.0 %]
 <h5>Git log</h5>
-<blockquote><pre>
-[%- FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
-[%IF not loop.last %]
-===================================================================
-[% END -%]
+<pre>
+<a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% last_build_git_ref %]">Change Set prior to this build</a>
+
+<a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% git_head_ref %]">Change Set including this build</a>
+
+[% FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
 [%- END -%]
-</pre></blockquote>
+</pre>
+</td>
 [%- ELSE %]
 <pre>
 not recorded
 </pre>
+</td>
 [% END -%]
+</tr>
 [% END %]
+</table>
 <h3>Log</h3>
 <pre>
 [% log | html %]