Merge pull request #644 from input-output-hk/declarative-jobset-error-message

improve the error messages when invalid declarative jobsets are defined
This commit is contained in:
Graham Christensen 2019-03-21 14:25:23 -04:00 committed by GitHub
commit 0e337e6f9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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";
}
}
});
};