Add buildQueued plugin hook

This commit is contained in:
Shea Levy
2017-05-24 09:45:31 -04:00
parent 3d044d2ec2
commit 582c399420
4 changed files with 19 additions and 0 deletions

View File

@ -471,6 +471,7 @@ sub checkBuild {
print STDERR "added build ${\$build->id} (${\$jobset->project->name}:${\$jobset->name}:$jobName)\n";
});
system("hydra-notify build-queued " . $build->id) if defined $buildMap->{$build->id} && $buildMap->{$build->id}->{new};
return $build;
};

View File

@ -42,6 +42,15 @@ if ($cmd eq "build-finished") {
}
}
elsif ($cmd eq "build-queued") {
foreach my $plugin (@plugins) {
eval { $plugin->buildQueued($build); };
if ($@) {
print STDERR "$plugin->buildQueued: $@\n";
}
}
}
elsif ($cmd eq "build-started") {
foreach my $plugin (@plugins) {
eval { $plugin->buildStarted($build); };