Add a hydra.conf option to enable email notification
Note that it's disabled by default.
This commit is contained in:
@ -47,6 +47,8 @@ sub jobset_GET {
|
||||
|
||||
$c->stash->{totalShares} = getTotalShares($c->model('DB')->schema);
|
||||
|
||||
$c->stash->{emailNotification} = $c->config->{email_notification} // 0;
|
||||
|
||||
$self->status_ok($c, entity => $c->stash->{jobset});
|
||||
}
|
||||
|
||||
@ -173,6 +175,7 @@ sub edit : Chained('jobsetChain') PathPart Args(0) {
|
||||
$c->stash->{edit} = !defined $c->stash->{params}->{cloneJobset};
|
||||
$c->stash->{cloneJobset} = defined $c->stash->{params}->{cloneJobset};
|
||||
$c->stash->{totalShares} = getTotalShares($c->model('DB')->schema);
|
||||
$c->stash->{emailNotification} = $c->config->{email_notification} // 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,6 +44,8 @@ EOF
|
||||
sub buildFinished {
|
||||
my ($self, $build, $dependents) = @_;
|
||||
|
||||
return unless $self->{config}->{email_notification} // 0;
|
||||
|
||||
die unless $build->finished;
|
||||
|
||||
# Figure out to whom to send notification for each build. For
|
||||
|
Reference in New Issue
Block a user