From e54b536bb77c02ad23ba7b08194f1805af495000 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Sep 2013 11:12:33 +0000 Subject: [PATCH] hydra-update-gc-roots: Don't keep the most recent successful view result Views are deprecated. --- src/script/hydra-update-gc-roots | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/script/hydra-update-gc-roots b/src/script/hydra-update-gc-roots index a39a2e83..1efbc69b 100755 --- a/src/script/hydra-update-gc-roots +++ b/src/script/hydra-update-gc-roots @@ -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}}; - } - } }