forked from lix-project/hydra
removed debug print, added last 50 lines in failure emails
This commit is contained in:
parent
8a01999220
commit
1c0d34d395
|
@ -146,6 +146,10 @@ sub sendEmailNotification {
|
||||||
}
|
}
|
||||||
$inputsTable->load(@lines);
|
$inputsTable->load(@lines);
|
||||||
|
|
||||||
|
my $loglines = 50;
|
||||||
|
my $logfile = $build->resultInfo->logfile;
|
||||||
|
my $logtext = `tail -$loglines $logfile` if -e $logfile;
|
||||||
|
|
||||||
my $body = "Hi,\n"
|
my $body = "Hi,\n"
|
||||||
. "\n"
|
. "\n"
|
||||||
. "This is to let you know that Hydra build" . $build->id
|
. "This is to let you know that Hydra build" . $build->id
|
||||||
|
@ -153,6 +157,7 @@ sub sendEmailNotification {
|
||||||
. "\n"
|
. "\n"
|
||||||
. "Complete build information can be found on this page: "
|
. "Complete build information can be found on this page: "
|
||||||
. "$selfURI/build/" . $build->id . "\n"
|
. "$selfURI/build/" . $build->id . "\n"
|
||||||
|
. ($build->resultInfo->buildstatus != 0 ? "\nThe last $loglines lines of the build log are shown at the bottom of this email.\n" : "")
|
||||||
. "\n"
|
. "\n"
|
||||||
. "A summary of the build information follows:\n"
|
. "A summary of the build information follows:\n"
|
||||||
. "\n"
|
. "\n"
|
||||||
|
@ -164,7 +169,9 @@ sub sendEmailNotification {
|
||||||
. $inputsTable->rule('-', '+')
|
. $inputsTable->rule('-', '+')
|
||||||
. $inputsTable->body
|
. $inputsTable->body
|
||||||
. "\n"
|
. "\n"
|
||||||
. "Regards,\n\nThe Hydra build daemon.\n";
|
. "Regards,\n\nThe Hydra build daemon.\n"
|
||||||
|
. ($build->resultInfo->buildstatus != 0 ? "\n---\n$logtext" : "");
|
||||||
|
|
||||||
# stripping trailing spaces from lines
|
# stripping trailing spaces from lines
|
||||||
$body =~ s/[\ ]+$//gm;
|
$body =~ s/[\ ]+$//gm;
|
||||||
|
|
||||||
|
@ -215,7 +222,7 @@ sub doBuild {
|
||||||
"--max-silent-time 3600 --keep-going --fallback " .
|
"--max-silent-time 3600 --keep-going --fallback " .
|
||||||
"--no-build-output --log-type flat --print-build-trace " .
|
"--no-build-output --log-type flat --print-build-trace " .
|
||||||
"--add-root " . gcRootFor $outPath . " 2>&1";
|
"--add-root " . gcRootFor $outPath . " 2>&1";
|
||||||
print STDERR $cmd;
|
|
||||||
my $max = $build->buildsteps->find(
|
my $max = $build->buildsteps->find(
|
||||||
{}, {select => {max => 'stepnr + 1'}, as => ['max']});
|
{}, {select => {max => 'stepnr + 1'}, as => ['max']});
|
||||||
my $buildStepNr = defined $max ? $max->get_column('max') : 1;
|
my $buildStepNr = defined $max ? $max->get_column('max') : 1;
|
||||||
|
|
Loading…
Reference in a new issue