improve the error messages when invalid declarative jobsets are defined

(cherry picked from commit 7568b89a1a9da3a58a0cdddc7b5bcea7bb6209d8)
This commit is contained in:
Michael Bishop 2018-09-11 08:03:58 -03:00 committed by Samuel Leathers
parent 8a41ea5f60
commit c741576563
No known key found for this signature in database
GPG key ID: 9BCE91C969768E0F

View file

@ -76,7 +76,12 @@ sub handleDeclarativeJobsetBuild {
push @kept, ".jobsets";
$project->jobsets->search({ name => { "not in" => \@kept } })->update({ enabled => 0, hidden => 1 });
while ((my $jobsetName, my $spec) = each %$declSpec) {
updateDeclarativeJobset($db, $project, $jobsetName, $spec);
eval {
updateDeclarativeJobset($db, $project, $jobsetName, $spec);
};
if ($@) {
print STDERR "ERROR: failed to process declarative jobset ", $project->name, ":${jobsetName}, ", $@, "\n";
}
}
});
};