* Get the URI for use in notification mails from the Hydra config
file.
This commit is contained in:
parent
1ca935e31a
commit
abe0a8eb9d
|
@ -10,6 +10,7 @@ use Email::Sender::Transport::SMTP;
|
|||
use Email::Simple;
|
||||
use Email::Simple::Creator;
|
||||
use Sys::Hostname::Long;
|
||||
use Config::General;
|
||||
|
||||
|
||||
STDOUT->autoflush();
|
||||
|
@ -17,6 +18,9 @@ STDOUT->autoflush();
|
|||
my $db = openHydraDB;
|
||||
|
||||
|
||||
my %config = new Config::General($ENV{"HYDRA_CONF"})->getall;
|
||||
|
||||
|
||||
sub getBuildLog {
|
||||
my ($drvPath) = @_;
|
||||
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
|
||||
|
@ -52,7 +56,7 @@ sub sendEmailNotification {
|
|||
|
||||
my $sender = ($ENV{'USER'} || "hydra") . "@" . hostname_long . "\n";
|
||||
|
||||
my $selfURI = $ENV{'HYDRA_BASE_URI'} || "http://localhost:3000/";
|
||||
my $selfURI = $config{'base_uri'} || "http://localhost:3000";
|
||||
|
||||
my $body = "Hi,\n"
|
||||
. "\n"
|
||||
|
|
Loading…
Reference in a new issue