Add documentation for SlackNotification plugin
[?]
Mar 26, 2020, 9:02 AM
PM3ZQ36VQMPHLDLYNWMNT5B3XQNVDJHHFERJHUV2EJDPPM5FK6NACDependencies
- [2]
5WNGKHLZPlugins: Add isEnabled method - [3]
MCMDIMNFSlackNotification: Use bigger images - [4]
6F3IODIRAdd duration to Slack notification. - [5]
KUORZDSRAdd slack plugin.
Change contents
- edit in src/lib/Hydra/Plugin/SlackNotification.pm at line 9
=head1 NAMESlackNotification - hydra-notify plugin for sending Slack notifications aboutbuild results=head1 DESCRIPTIONThis plugin reports build statuses to various Slack channels. One can configurewhich builds are reported to which channels, and whether reports should be onstate change (regressions and improvements), or for each build.=head1 CONFIGURATIONThe module is configured using the C<slack> block in Hydra's config file. Therecan be multiple such blocks in the config file, each configuring different (oreven the same) set of builds and how they report to Slack channels.The following entries are recognized in the C<slack> block:=over 4=item jobsA pattern for job names. All builds whose job name matches this pattern willemit a message to the designated Slack channel (see C<url>). The pattern willmatch the whole name, thus leaving this field empty will result in nonotifications being sent. To match on all builds, use C<.*>. - edit in src/lib/Hydra/Plugin/SlackNotification.pm at line 38
=item urlThe URL to a L<Slack incoming webhook|https://api.slack.com/messaging/webhooks>.Slack administrators have to prepare one incoming webhook for each channel. ThisURL should be treated as secret, as anyone knowing the URL could post a messageto the Slack workspace (or more precisely, the channel behind it).=item force(Optional) An I<integer> indicating whether to report on every build or only onchanges in the status. If not provided, defaults to 0, that is, sending reportsonly when build status changes from success to failure, and vice-versa. Anyother value results in reporting on every build.=back=cut - edit in src/lib/Hydra/Plugin/SlackNotification.pm at line 94
next unless $jobName =~ /^$channel->{jobs}$/; - edit in src/lib/Hydra/Plugin/SlackNotification.pm at line 97
next unless $jobName =~ /^$channel->{jobs}$/;