Tasks: only execute the event if the plugin is interested in it

This commit is contained in:
Graham Christensen
2021-12-20 13:27:59 -05:00
parent 633fc36d6a
commit a14501c616
12 changed files with 150 additions and 21 deletions

View File

@ -25,29 +25,35 @@ sub instantiate {
return @$plugins;
}
# Called when build $build has been queued.
sub buildQueued {
my ($self, $build) = @_;
}
# To implement behaviors in response to the following events, implement
# the function in your plugin and it will be executed by hydra-notify.
#
# See the tests in t/Event/*.t for arguments, and the documentation for
# notify events for semantics.
#
# # Called when build $build has been queued.
# sub buildQueued {
# my ($self, $build) = @_;
# }
# Called when build $build has started.
sub buildStarted {
my ($self, $build) = @_;
}
# # Called when build $build has started.
# sub buildStarted {
# my ($self, $build) = @_;
# }
# Called when build $build has finished. If the build failed, then
# $dependents is an array ref to a list of builds that have also
# failed as a result (i.e. because they depend on $build or a failed
# dependeny of $build).
sub buildFinished {
my ($self, $build, $dependents) = @_;
}
# # Called when build $build has finished. If the build failed, then
# # $dependents is an array ref to a list of builds that have also
# # failed as a result (i.e. because they depend on $build or a failed
# # dependeny of $build).
# sub buildFinished {
# my ($self, $build, $dependents) = @_;
# }
# Called when step $step has finished. The build log is stored in the
# file $logPath (bzip2-compressed).
sub stepFinished {
my ($self, $step, $logPath) = @_;
}
# # Called when step $step has finished. The build log is stored in the
# # file $logPath (bzip2-compressed).
# sub stepFinished {
# my ($self, $step, $logPath) = @_;
# }
# Called to determine the set of supported input types. The plugin
# should add these to the $inputTypes hashref, e.g. $inputTypes{'svn'}