XBU2ODSPGKXUPOV5CFKOBOJLCIU5BMMZ5YVWFR7CP2G5QQZ5GAJAC
2BUX775ILK47LEDXNPSVUAKVLEKG54ODCXRG3474DHY5PHJJBNBQC
P5X4P6VKS5CJOOLJRVL66GRJLDLVC3EKAVAHP2RJOXQJ7WTYAUBQC
A63IHCMXH3F4V56HDXJLJVVHKXRSJCJMT2PWXXI2IW3J734J6SGQC
PPJN6SDP3BIWOB5LB3B2F3HEWM4IG7WZMG7JICERVBR7CDMBOPOQC
2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC
IN272KZWHENW2TCR3LWQ6OZAEESJL5S7AEL3GYLJTWHJUDE6HADAC
4X6NS66QDWR4S4ZZFKN2QOJQII5ZYIMTDYRHK25N6NJSROVLHJ6QC
WZ3AEJ67LOG5L335AAC2BDLIJPIU4VSCGBMATBHDZC26ECRS5A6AC
NEWDDAOFCDLYBXQCZNQ2GDH7HPAHVN3YRDL52ZYEMVA4YH6LBDXAC
push @results, getRelease($_, $c->stash->{jobs}) foreach
getPrimaryBuildsForReleaseSet($c->stash->{project}, $c->stash->{primaryJob}, $page, $resultsPerPage);
push @results, getViewResult($_, $c->stash->{jobs}) foreach
getPrimaryBuildsForView($c->stash->{project}, $c->stash->{primaryJob}, $page, $resultsPerPage);
my ($project, $primaryJob) = @_;
my $allPrimaryBuilds = $project->builds->search(
{ jobset => $primaryJob->get_column('jobset'), job => $primaryJob->get_column('job'), finished => 1 },
{ join => 'resultInfo', order_by => "timestamp DESC"
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
, '+as' => ["releasename", "buildstatus"]
, where => \ attrsToSQL($primaryJob->attrs, "me.id")
});
return $allPrimaryBuilds;
my ($project, $primaryJob) = @_;
my $allPrimaryBuilds = $project->builds->search(
{ jobset => $primaryJob->get_column('jobset'), job => $primaryJob->get_column('job'), finished => 1 },
{ join => 'resultInfo', order_by => "timestamp DESC"
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
, '+as' => ["releasename", "buildstatus"]
, where => \ attrsToSQL($primaryJob->attrs, "me.id")
});
return $allPrimaryBuilds;
foreach my $build (getPrimaryBuildsForReleaseSet($project, $primaryJob)) {
return $build if getRelease($build, $jobs)->{status} == 0;
foreach my $build (getPrimaryBuildsForView($project, $primaryJob)) {
return $build if getViewResult($build, $jobs)->{status} == 0;
foreach my $releaseSet ($project->releasesets->all) {
print STDERR "*** looking for builds to keep in release set ", $project->name, ":", $releaseSet->name, "\n";
foreach my $view ($project->views->all) {
print STDERR "*** looking for builds to keep in view ", $project->name, ":", $view->name, "\n";
# Keep all builds belonging to the most recent successful release.
my $latest = getLatestSuccessfulRelease($project, $primaryJob, $jobs);
# Keep all builds belonging to the most recent successful view result.
my $latest = getLatestSuccessfulViewResult($project, $primaryJob, $jobs);
print STDERR "keeping latest successful release ", $latest->id, " (", $latest->get_column('releasename'), ")\n";
my $release = getRelease($latest, $jobs);
keepBuild $_->{build} foreach @{$release->{jobs}};
print STDERR "keeping latest successful view result ", $latest->id, " (", $latest->get_column('releasename'), ")\n";
my $result = getViewResult($latest, $jobs);
keepBuild $_->{build} foreach @{$result->{jobs}};