hydra: moved getbuildlog

This commit is contained in:
Rob Vermaas 2010-09-02 08:56:29 +00:00
parent d7487ab0d9
commit c5ceece093
2 changed files with 9 additions and 8 deletions

View file

@ -10,12 +10,20 @@ use Digest::SHA qw(sha256_hex);
use File::Path; use File::Path;
our @ISA = qw(Exporter); our @ISA = qw(Exporter);
our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName); our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog);
sub scmPath { sub scmPath {
return getHydraPath . "/scm" ; return getHydraPath . "/scm" ;
} }
sub getBuildLog {
my ($drvPath) = @_;
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
return -e $logPath ? $logPath : undef;
}
sub getStorePathHash { sub getStorePathHash {
my ($storePath) = @_; my ($storePath) = @_;
my $hash = `nix-store --query --hash $storePath` my $hash = `nix-store --query --hash $storePath`

View file

@ -26,13 +26,6 @@ my $db = openHydraDB;
my %config = new Config::General($ENV{"HYDRA_CONFIG"})->getall; my %config = new Config::General($ENV{"HYDRA_CONFIG"})->getall;
sub getBuildLog {
my ($drvPath) = @_;
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
return -e $logPath ? $logPath : undef;
}
sub sendTwitterNotification { sub sendTwitterNotification {
my ($build) = @_; my ($build) = @_;