forked from lix-project/hydra
hydra: moved getbuildlog
This commit is contained in:
parent
d7487ab0d9
commit
c5ceece093
|
@ -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`
|
||||||
|
|
|
@ -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) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue