* Include more info in notification emails.

[?]
Aug 12, 2009, 1:31 PM
QUTWJR7PQZ3DBPC4G2AFXOKPPGFZQLE5RLXHAOFTLMXIT2QPF4TQC

Dependencies

  • [2] 6KCP6ODP * Get the URI for use in notification mails from the Hydra config
  • [3] XZ7ZIKCV * Allow overriding the sender email address.
  • [4] 7YBYT2LQ
  • [5] SAFVRDTK * Put Hydra's dependencies so that they can easily be installed in a
  • [6] KA45EBF5 * Send email if a build fails.
  • [7] OG7BEM57
  • [*] RWIBJ5L4 * Autoflush stdout.

Change contents

  • replacement in deps.nix at line 20
    [4.61][4.61:92]()
    perlPackages.ModulePluggable
    [4.61]
    [4.497]
    perlPackages.TextTable
  • edit in deps.nix at line 22
    [4.499]
  • edit in src/script/hydra_build.pl at line 14
    [2.21]
    [9.0]
    use Text::Table;
    use POSIX qw(strftime);
  • replacement in src/script/hydra_build.pl at line 60
    [3.51][3.51:118]()
    (($ENV{'USER'} || "hydra") . "@" . hostname_long . "\n");
    [3.51]
    [4.3075]
    (($ENV{'USER'} || "hydra") . "@" . hostname_long);
  • edit in src/script/hydra_build.pl at line 63
    [2.153]
    [4.807]
    sub showTime { my ($x) = @_; return strftime('%Y-%m-%d %H:%M:%S', localtime($x)); }
    my $infoTable = Text::Table->new({ align => "left" }, \" | ", { align => "left" });
    my @lines = (
    [ "Build ID:", $build->id ],
    [ "Nix name:", $build->nixname ],
    [ "Short description:", $build->description || '(not given)' ],
    [ "Maintainer(s):", $build->maintainers ],
    [ "System:", $build->system ],
    [ "Derivation store path:", $build->drvpath ],
    [ "Output store path:", $build->outpath ],
    [ "Time added:", showTime $build->timestamp ],
    );
    push @lines, (
    [ "Build started:", showTime $build->resultInfo->starttime ],
    [ "Build finished:", showTime $build->resultInfo->stoptime ],
    [ "Duration:", $build->resultInfo->stoptime - $build->resultInfo->starttime . "s" ],
    ) if $build->resultInfo->starttime;
    $infoTable->load(@lines);
    my $inputsTable = Text::Table->new(
    { title => "Name", align => "left" }, \" | ",
    { title => "Type", align => "left" }, \" | ",
    { title => "Value", align => "left" });
    @lines = ();
    foreach my $input ($build->inputs) {
    my $type = $input->type;
    push @lines,
    [ $input->name
    , $input->type
    , $input->type eq "build"
    ? $input->dependency->id
    : ($input->type eq "string" || $input->type eq "boolean")
    ? $input->value : ($input->uri . ':' . $input->revision)
    ];
    }
    $inputsTable->load(@lines);
  • replacement in src/script/hydra_build.pl at line 107
    [4.980][4.980:1039]()
    . "The build information page can be found here: "
    [4.980]
    [4.1039]
    . "Complete build information page can be found here: "
  • edit in src/script/hydra_build.pl at line 110
    [4.1102]
    [4.1102]
    . "A summary of the build information follows:\n"
    . "\n"
    . $infoTable->body
    . "\n"
    . "The build inputs were:\n"
    . "\n"
    . $inputsTable->title
    . $inputsTable->rule('-', '+')
    . $inputsTable->body
    . "\n"