diff --git a/src/script/hydra_build.pl b/src/script/hydra_build.pl index 85e3656d..f5838b92 100755 --- a/src/script/hydra_build.pl +++ b/src/script/hydra_build.pl @@ -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"