Mutliple <githubstatus> sections are possible: * jobs: regexp for jobs to match * inputs: the input which corresponds to the github repo/rev whose status we want to report. Can be repeated * authorization: Verbatim contents of the Authorization header. See https://developer.github.com/v3/#authentication.
36 lines
705 B
Perl
36 lines
705 B
Perl
package Hydra::Helper::PluginHooks;
|
|
|
|
use strict;
|
|
use Exporter;
|
|
|
|
our @ISA = qw(Exporter);
|
|
our @EXPORT = qw(
|
|
notifyBuildStarted
|
|
notifyBuildFinished);
|
|
|
|
sub notifyBuildStarted {
|
|
my ($plugins, $build) = @_;
|
|
foreach my $plugin (@{$plugins}) {
|
|
eval {
|
|
$plugin->buildStarted($build);
|
|
};
|
|
if ($@) {
|
|
print STDERR "$plugin->buildStarted: $@\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
sub notifyBuildFinished {
|
|
my ($plugins, $build, $dependents) = @_;
|
|
foreach my $plugin (@{$plugins}) {
|
|
eval {
|
|
$plugin->buildFinished($build, $dependents);
|
|
};
|
|
if ($@) {
|
|
print STDERR "$plugin->buildFinished: $@\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
1;
|