KAZWI5G4DN2WUW7L2KWZR3D3QQJON4ISQYP7CRLC5HAOPIDYQGRQC
CEARA7OHINXEQLCVPJ3SP5NJLGMFYXH5UEPDZ5BQ57SBJXHLQESAC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
5NO7NCKTMM5ZW7JYOETUFOSWK2ACTXWDZGJAFXZN6L3OF6BFTNOQC
CS7T2XFIISZ7TPQ6FFRIDYPR6BDCQHURP4JE4YKLI4OYSNWKZCHAC
SJN2QPWHFYKX7CJMW4XZHI2P2THH7MECZZIHQMCH6EKBZ45G3DOAC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
Z6MDQIGODVE7RXX5U5D64EEC2ZDEZ36Z4ZMPFYIHWBG42IXUDYFQC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
ZI535LI6PJMKSOBJE33B3RRZ5S2JVTR3XPUDTSXJW6BZNTAHS3GQC
IK53RV4VGOHLCZGQCCIKPB45M3C7M7YMNBOJFBGZJ4LWIZNU4QNQC
}
sub getPreviousBuild {
my ($c, $build) = @_;
(my $prevBuild) = $c->model('DB::Builds')->search(
{ finished => 1
, system => $build->system
, project => $build->project->name
, jobset => $build->jobset->name
, job => $build->job->name
, 'me.id' => { '<' => $build->id }
}, {rows => 1, order_by => "id DESC"});
return $prevBuild;
sub getPreviousSuccessfulBuild {
my ($c, $build) = @_;
(my $prevBuild) = joinWithResultInfo($c, $c->model('DB::Builds'))->search(
{ finished => 1
, system => $build->system
, project => $build->project->name
, jobset => $build->jobset->name
, job => $build->job->name
, buildstatus => 0
, 'me.id' => { '<' => $build->id }
}, {rows => 1, order_by => "id DESC"});
return $prevBuild;
}
[% IF prevBuild %]
<h2>Changes since previous build : [% INCLUDE renderFullBuildLink build=prevBuild %]</h2>
[% INCLUDE renderInputDiff build2=build , build1=prevBuild %]
[% END %]
[% IF prevBuild && prevSuccessfulBuild.id != prevBuild.id %]
<h2>Changes since previous successful build : [% INCLUDE renderFullBuildLink build=prevSuccessfulBuild %]</h2>
[% INCLUDE renderInputDiff build2=build , build1=prevSuccessfulBuild %]
[% END %]
[% BLOCK renderInputValue %]
[% IF input.type == "build" || input.type == "sysbuild" %]
[% INCLUDE renderFullBuildLink build=input.dependency %]</a>
[% ELSIF input.type == "string" || input.type == "boolean" %]
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %][% IF input.revision %] (r. [% input.revision %])[% END %]</tt>
[% END %]
[% END %]
[% BLOCK renderInputDiff; %]
<table class="tablesorter">
<thead>
<tr><th>Name</th><th>Change</th></tr>
</thead>
<tbody>
[% FOREACH bi1 IN build1.inputs %]
[% deletedInput = 1 %]
[% FOREACH bi2 IN build2.inputs %]
[% IF bi1.name == bi2.name %]
<tr>
[% IF bi1.type == bi2.type %]
[% IF bi1.value != bi2.value || bi1.uri != bi2.uri || bi1.revision != bi2.revision || bi1.path != bi2.path || bi1.dependency != bi2.dependency %]
<td>[% bi1.name %]</td>
<td>
[% INCLUDE renderInputValue input=bi1 %] to [% INCLUDE renderInputValue input=bi2 %]
</td>
[% END %]
[% ELSE %]
<td>[% bi1.name %]</td>
<td>Changed input type from '[% type = bi1.type; inputTypes.$type %]' to '[% type = bi2.type; inputTypes.$type %]'</td>
[% END %]
</tr>
[% deletedInput = 0 %]
[% END %]
[% END %]
[% IF deletedInput == 1 %]
<tr><td>[% bi1.name %]</td><td>Input not present in this build.</td></tr>
[% END %]
[% END %]
</tbody>
</table>
[% END %]