Hydra/23: added some X-headers with meta info in email notifications, added more descriptive status

[?]
Apr 26, 2010, 2:36 PM
FHAVPTZ6GYCZMMPIJN2VPGBACK66NENWCFJMTAOW6464WNCJPVOQC

Dependencies

  • [2] 4IXVBLUI hack to try and prevent too many newlines
  • [3] YFPZ46YK * hydra: added variant of build input type, 'build output (same system)' to allow better continous integration in one jobset for multiple system. it makes sure that the system of the build that is passed as input for a job has the same system as the job.
  • [4] IS32JFKX * Typo.
  • [5] FYO6NECE hydra
  • [6] ZDENAYQI * email notification of evaluation errors to project owner (if desired)
  • [7] FDE3BJAP * Refactoring.
  • [8] L2E6EVE2 * Merged the Build and Job tables.
  • [9] KA45EBF5 * Send email if a build fails.
  • [10] OG7BEM57
  • [11] 7YBYT2LQ
  • [12] QUTWJR7P * Include more info in notification emails.
  • [13] XZ7ZIKCV * Allow overriding the sender email address.
  • [*] CXRCPDSQ * added support for twitter notification
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • edit in src/script/hydra_build.pl at line 18
    [3.2353]
    [5.2987]
    use Switch;
  • edit in src/script/hydra_build.pl at line 66
    [15.1033]
    [5.402]
    sub statusDescription {
    my ($buildstatus) = @_;
    my $status = "Unknown failure";
    switch ($buildstatus) {
    case 0 { $status = "Success"; }
    case 1 { $status = "Failed with non-zero exit code"; }
    case 2 { $status = "Dependency failed"; }
    case 4 { $status = "Cancelled"; }
    }
    return $status;
    }
  • replacement in src/script/hydra_build.pl at line 112
    [5.573][5.4249:4574]()
    my $status = $build->resultInfo->buildstatus == 0 ? "SUCCEEDED" : "FAILED";
    my $statusMsg;
    if(defined $prevBuild) {
    my $prevStatus = $prevBuild->resultInfo->buildstatus == 0 ? "SUCCEEDED" : "FAILED";
    $statusMsg = "changed from $prevStatus to $status";
    } else {
    $statusMsg = $status;
    }
    [5.573]
    [5.661]
    my $status = statusDescription($build->resultInfo->buildstatus);
  • edit in src/script/hydra_build.pl at line 114
    [5.662]
    [5.0]
    my $url = hostname_long ;
  • replacement in src/script/hydra_build.pl at line 116
    [5.51][5.70:130]()
    (($ENV{'USER'} || "hydra") . "@" . hostname_long);
    [5.51]
    [5.3075]
    (($ENV{'USER'} || "hydra") . "@" . $url);
  • replacement in src/script/hydra_build.pl at line 165
    [4.67][5.4641:4696](),[5.4641][5.4641:4696]()
    . " of job " . $jobName . " has $statusMsg.\n"
    [4.67]
    [5.965]
    . " of job " . $jobName . " " . (defined $prevBuild ? "has changed from '".statusDescription($prevBuild->resultInfo->buildstatus)."' to '$status'" : "has succeeded" ) .".\n"
  • replacement in src/script/hydra_build.pl at line 192
    [5.1209][5.1209:1287]()
    Subject => "Hydra job $jobName build " . $build->id . " $status",
    [5.1209]
    [5.760]
    Subject => "Hydra job $jobName build " . $build->id . ": $status",
    'X-Hydra-Instance' => $url,
    'X-Hydra-Project' => $build->project->name,
    'X-Hydra-Jobset' => $build->jobset->name,
    'X-Hydra-Job' => $build->job->name
  • replacement in src/script/hydra_build.pl at line 205
    [5.846][5.846:868]()
    sendmail($email);
    [5.846]
    [5.868]
    sendmail($email);
  • edit in src/script/hydra_scheduler.pl at line 58
    [5.1180]
    [5.671]
    my $url = hostname_long;
  • replacement in src/script/hydra_scheduler.pl at line 63
    [5.805][5.805:865]()
    (($ENV{'USER'} || "hydra") . "@" . hostname_long);
    [5.805]
    [5.865]
    (($ENV{'USER'} || "hydra") . "@" . $url);
  • replacement in src/script/hydra_scheduler.pl at line 79
    [5.1398][5.1398:1409]()
    ],
    [5.1398]
    [2.51]
    'X-Hydra-Instance' => $url,
    'X-Hydra-Project' => $projectName,
    'X-Hydra-Jobset' => $jobsetName
    ],