forked from lix-project/hydra
hydra-update-gc-roots: Don't keep the most recent successful view result
Views are deprecated.
This commit is contained in:
parent
2845d46d21
commit
e54b536bb7
1 changed files with 0 additions and 16 deletions
|
@ -113,22 +113,6 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name
|
|||
},
|
||||
{ order_by => ["job", "id"], columns => [ @columns ] });
|
||||
}
|
||||
|
||||
# Go over all views in this project.
|
||||
foreach my $view ($project->views->all) {
|
||||
print STDERR "*** looking for builds to keep in view ", $project->name, ":", $view->name, "\n";
|
||||
|
||||
(my $primaryJob) = $view->viewjobs->search({isprimary => 1});
|
||||
my $jobs = [$view->viewjobs->all];
|
||||
|
||||
# Keep all builds belonging to the most recent successful view result.
|
||||
my $latest = getLatestSuccessfulViewResult($project, $primaryJob, $jobs, 0);
|
||||
if (defined $latest) {
|
||||
print STDERR " keeping latest successful view result ", $latest->id, " (", $latest->get_column('releasename') // "unnamed", ")\n";
|
||||
my $result = getViewResult($latest, $jobs);
|
||||
keepBuild $_->{build} foreach @{$result->{jobs}};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue