Graham Christensen
4fd90ec784
EmailNotification: address Use of uninitialized value in numeric eq (==)
2021-10-19 21:52:39 -04:00
Your Name
4677a7c894
perlcritic: use strict, use warnings
2021-09-06 22:13:33 -04:00
Graham Christensen
0d4ce15c62
EmailNotification: $build -> $topbuild, $b -> $build (perlcritic)
2021-08-20 21:52:32 -04:00
Eelco Dolstra
92d8d6baa5
Avoid fetching Projects/Jobsets just to get the name column
...
In particular, doing a 'select * from Jobsets where ...' must be
avoided, because the 'errormsg' column can be very big.
2019-08-13 18:18:25 +02:00
Eelco Dolstra
16811d3e78
Plugins: Add isEnabled method
...
Plugins are now disabled at startup time unless there is some relevant
configuration in hydra.conf. This avoids hydra-notify having to do a
lot of redundant work (a lot of plugins did a lot of database queries
*before* deciding they were disabled).
Note: BitBucketStatus users will need to add 'enable_bitbucket_status
= 1' to hydra.conf.
2019-08-13 18:18:25 +02:00
Eelco Dolstra
02888105a8
Add a hydra.conf option to enable email notification
...
Note that it's disabled by default.
2018-03-12 14:04:23 +01:00
Eelco Dolstra
5e265e6739
Tweak blame message
2014-11-19 15:24:31 +01:00
Eelco Dolstra
2d46741840
Fix message
2014-11-19 14:52:42 +01:00
Eelco Dolstra
8523130ebb
Use Email::MIME instead of Email::Simple
...
Email::Simple cannot handle non-ASCII characters.
Fixes #191 .
2014-11-19 14:45:46 +01:00
Shea Levy
b29d7b1091
Only email responsible authors when the build has changed
2014-02-26 11:05:46 -05:00
Eelco Dolstra
c719bebcb4
Remove redundant newlines
2013-10-17 11:20:27 +02:00
Shea Levy
806af3fe68
Fix typos
...
I could've sworn I tested this...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-16 08:57:48 -04:00
Shea Levy
26470f1656
Check all inputs for blame but only email selected inputs
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-08 14:47:24 -04:00
Shea Levy
804617f075
Email responsible authors if requested
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-08 13:24:49 -04:00
Shea Levy
f8b80c99c2
Include who-broke-the-build information in notification emails
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-08 13:24:49 -04:00
Eelco Dolstra
e4cbd057e2
Fix an uninitialized value warning
2013-09-18 12:51:51 +00:00
Shea Levy
b46f2134e0
Revert "Emable overriding the email template."
...
This doesn't work as planned, will re-work.
This reverts commit 304f8a5714371ede4438d07c04b22ba0e734c817.
2013-07-05 18:10:50 -04:00
Shea Levy
a168f43515
Revert "Handle HYDRA_EMAIL_TEMPLATES that are paths"
...
This doesn't work as planned, will re-work.
This reverts commit d2ce7747a0a44c1278361d69af1d53d193fdc6c8.
2013-07-05 18:10:21 -04:00
Shea Levy
d2ce7747a0
Handle HYDRA_EMAIL_TEMPLATES that are paths
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 17:22:51 -04:00
Shea Levy
304f8a5714
Emable overriding the email template.
...
The HYDRA_EMAIL_TEMPLATE env var can be set to any value understood by
https://metacpan.org/module/Template#process-template-vars-output-options
as the $template argument.
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 16:29:09 -04:00
Shea Levy
93a14ccf32
Check if we want to send email for a build before iterating through its users
...
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-07-05 14:06:10 -04:00
Eelco Dolstra
698d6eac89
Eliminate duplicate getPreviousBuild functions
...
And move some stuff into CatalystUtils for use by other plugins.
2013-06-27 18:08:00 +02:00
Eelco Dolstra
e09622eb29
Include # of failed builds in Subject
2013-05-21 18:30:05 -04:00
Eelco Dolstra
444b03bad2
Omit the system type if it's part of the job name
2013-05-15 11:43:06 +02:00
Eelco Dolstra
ac6a152ec5
Improve email notifications status messages
...
Add "Failed with output", and shorten "Failed with non-zero exit code"
to "Failed".
2013-05-15 11:31:37 +02:00
Eelco Dolstra
184d23dc41
Remove debug line
2013-05-09 15:10:30 +02:00
Eelco Dolstra
de89c566f8
Use Template::Toolkit to generate email messages
...
Also, make the messages much shorter by not including build details.
2013-05-09 14:23:15 +02:00
Eelco Dolstra
b378d94087
If multiple dependent builds fail, send a single email
2013-05-09 11:39:58 +02:00
Eelco Dolstra
44b8d6f449
Use OO-style plugins
...
This is mostly so we don't have to pass around common parameters like
"db" and "config", and we don't have to check for the existence of
methods.
A plugin now looks like this:
package Hydra::Plugin::TwitterNotification;
use parent 'Hydra::Plugin';
sub buildFinished {
my ($self, $build, $dependents) = @_;
print STDERR "tweeting about build ", $build->id, "\n";
# Send tweet...
# Hydra database is $self->{db}.
}
2013-05-08 18:35:24 +02:00
Eelco Dolstra
1d8bb0764b
Add a plugin mechanism
...
You can now add plugins to Hydra by writing a module called
Hydra::Plugin::<whatever> and putting it in Perl's search path. The
only plugin operation currently supported in buildFinished, called
when hydra-build has finished doing a build.
For instance, a Twitter notification plugin would look like this:
package Hydra::Plugin::TwitterNotification;
sub buildFinished {
my ($self, $db, $config, $build, $dependents) = @_;
print STDERR "tweeting about build ", $build->id, "\n";
# send tweet...
}
1;
2013-05-08 17:30:30 +02:00