From abe0a8eb9db83e0e2b552bb0df5b0fd867e02003 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 10 Jul 2009 09:47:42 +0000 Subject: [PATCH] * Get the URI for use in notification mails from the Hydra config file. --- src/script/hydra_build.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"