hydra: if a project or jobset is hidden (and thus disabled) do not keep builds

This commit is contained in:
Rob Vermaas 2010-08-09 18:36:16 +00:00
parent 066fd3e41f
commit 34e309f0f7

View file

@ -34,11 +34,11 @@ sub keepBuild {
# Go over all projects. # Go over all projects.
foreach my $project ($db->resultset('Projects')->all) { foreach my $project ($db->resultset('Projects')->search({hidden => 0},{})) {
# Go over all jobs in this project. # Go over all jobs in this project.
foreach my $job ($project->jobs->all) { foreach my $job ($project->jobs->search({hidden => 0}, { join => "jobset"})) {
print STDERR "*** looking for builds to keep in job ", print STDERR "*** looking for builds to keep in job ",
$project->name, ":", $job->jobset->name, ":", $job->name, "\n"; $project->name, ":", $job->jobset->name, ":", $job->name, "\n";