3 Copyright (c) 2003-2010, Andrew Dunstan
5 See accompanying License file for license details
11 $stash->set(lrfactor => $lrfactor);
12 my $rows = $stash->get('log_file_names');
13 my $logrows = ceil(scalar(@$rows)/$lrfactor);
14 my $logcells = $lrfactor * $logrows;
15 $stash->set( logcells => $logcells);
16 $stash->set( logrows => $logrows );
18 [% 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 -%]
20 cvsurl = 'http://anoncvs.postgresql.org/cvsweb.cgi';
21 giturl = scmurl || 'https://git.exim.org/gitweb?p=exim.git;a=commit;h=';
29 commitref = clog.replace('^commit ([0-9A-Fa-f]+)(.|\n)*','$1');
30 logtail = clog.replace('^commit ([0-9A-Fa-f]+)','');
31 logtail = logtail.replace('\n',' ');
33 %]<a href="[% giturl ; commitref %]">[% commitref %]</a>[% logtail | html %]
35 <h1>Exim Build Farm Log</h1>
36 <h2>Details for system "[% system %]"[% IF stage != 'OK' %] failure at stage [% stage ; ELSE %], status 'OK'[% END %], snapshot taken [% urldt %]</h2>
37 <table cellspacing="0">
39 <th class="head" rowspan="2">System Information</th>
49 <td><a href="/cgi-bin/show_history.pl?nm=[% system %]&br=[% branch | uri %]">[% branch %]</a></td>
50 <td>[% info_row.operating_system %] [% info_row.os_version %]</td>
51 <td>[% info_row.compiler %] [% info_row.compiler_version %]</td>
52 <td>[% info_row.architecture %]</td>
53 <td>[% info_row.owner_email %]</td>
56 [% IF info_row.sys_notes %]
60 <th class="head" rowspan="2">System Notes</th>
65 <td>[% info_row.sys_notes_date %]</td>
66 <td>[% info_row.sys_notes %]</td>
70 [% cell = 0; FOREACH logstage IN log_file_names ; striplog = logstage.replace('\.log$','') ; cell = loop.count %]
72 <br /> <table><tr><th class='head' rowspan='[% logrows %]'>Stage Logs<br /><br />Total run time<br />[% run_time %]</th>
74 [% IF loop.count > 1 and loop.count % lrfactor == 1 %]<tr>[% END %]
75 <td><a href='show_stage_log.pl?nm=[% system %]&dt=[% urldt | uri %]&stg=[% striplog %]'>[% striplog %]</a> ([% stage_times.$logstage.stage_duration %])</td>
76 [% IF loop.count % lrfactor == 0 %]</tr>[% END %]
79 [% IF cell > 0 ; nrcell = cell + 1; ncells = [ nrcell .. logcells ] ; FOREACH rcell IN ncells %]
80 [% IF rcell > 1 and rcell % lrfactor == 1 %]<tr>[% END %]
82 [% IF rcell % lrfactor == 0 %]</tr>[% END %]
87 <h3>Configuration summary</h3>
94 <h3>Files changed this run</h3>
95 [%- IF changed_this_run.0 -%]
97 [%- FOREACH changed IN changed_this_run %]
98 <a href="[% IF scm == 'git' ; giturl; changed.1; ELSE ; cvsurl ; changed.0; 'rev='; changed.1; END %]">[% changed.0 ; IF scm == 'cvs'; ' '; changed.1; END %]</a>
103 <td valign="top" style="padding-left: 10pt;">
104 [% IF changed_this_run_logs.0 %]
107 [% IF last_build_git_ref && git_head_ref %]
108 <a href="https://github.com/Exim/exim/compare/[% last_build_git_ref %]...[% git_head_ref %]">Change Set for this build</a>
110 [% FOREACH clog IN changed_this_run_logs ; PROCESS gitlog -%]
120 [% IF stage != 'OK' %]
123 <h3>Files changed since last success</h3>
124 [%- IF changed_since_success.0 %]
126 [%- FOREACH changed IN changed_since_success %]
127 <a href="[% IF scm == 'git' ; giturl; changed.1; ELSE ; cvsurl ; changed.0; 'rev='; changed.1; END %]">[% changed.0 ; IF scm == 'cvs'; ' '; changed.1; END %]</a>
132 <td valign="top" style="padding-left: 10pt;">
133 [% IF changed_since_success_logs.0 %]
136 <a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% last_build_git_ref %]">Change Set prior to this build</a>
138 <a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% git_head_ref %]">Change Set including this build</a>
140 [% FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]