* hydra: handle case where logfile is empty

[?]
Feb 8, 2010, 11:46 AM
NZI7E2E3LQJ6SGK3WURDUEE54JWEBVDNHTQ2PYSKHRCRZVOWKQVAC

Dependencies

  • [2] ZNKPGZHF hydra: error on buildpage for queued build
  • [3] MPVX6MKX * hydra: on build page, show tail of log on first tab when buildstatus == 1 (this specific build failed)
  • [4] HB3OHPJL hydra: in case of cached build, add link to build that built the storepath
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.

Change contents

  • replacement in src/lib/Hydra/Controller/Build.pm at line 48
    [2.97][2.97:231](),[2.231][3.201:288](),[3.201][3.201:288]()
    if (defined $build->resultInfo && $build->resultInfo->buildstatus == 1 && $lastBuildStep && isValidPath($lastBuildStep->logfile)) {
    my $path = $lastBuildStep->logfile;
    $c->stash->{logtext} = `tail -n 50 $path`;
    }
    [2.97]
    [3.249]
    my $path = defined $lastBuildStep ? $lastBuildStep->logfile : "" ;
    if (defined $build->resultInfo && $build->resultInfo->buildstatus == 1 && !($path eq "") && isValidPath($lastBuildStep->logfile)) {
    $c->stash->{logtext} = `tail -n 50 $path`;
    }