FHAVPTZ6GYCZMMPIJN2VPGBACK66NENWCFJMTAOW6464WNCJPVOQC
4IXVBLUICBCBNLPJ23NDC7UKEPFN53HWVNZXK5HR23JMZEM2GUBAC
YFPZ46YK4BOI6VH2H3F757UEGEYONURUAEDAYEIBLRY33PLSSO4AC
IS32JFKXL5BXWRTLUTE75X5GZRSIK3LM3ECQOKH53WIH7MRTRJGAC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
CXRCPDSQEWHSZNCJIORUAINH5I2FFFQ7AVUQOB62REGROLROPE7QC
OG7BEM57MXPCG56IT5GODPFG77KZXWPXZ7OVZPWQQ56CRJ7KUE2QC
KA45EBF5GVBBFQ2E6GSMDJ5ORSOJ7YP5EHAHLUZB226F7WNO6KYQC
FYO6NECE4YJC76HQIG35NNJABODV7KNQKREK5YKZU6O2MNNSQTMAC
XZ7ZIKCVF7RQHIPBMQXL4JEYCXOQ6KSKLUMR7ATUXQILTHXDYPTAC
QUTWJR7PQZ3DBPC4G2AFXOKPPGFZQLE5RLXHAOFTLMXIT2QPF4TQC
FDE3BJAPDEP3BYT5A5GEGLNXPPZLA2KTGXB4ZNYRP4LJ7IFRKYXAC
ZDENAYQI5DRRNUIDVKUGC45NK6C4ZFUL5FYMACTRZOCYQXPMY63QC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
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;
}
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;
}
my $status = statusDescription($build->resultInfo->buildstatus);
Subject => "Hydra job $jobName build " . $build->id . " $status",
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