forked from lix-project/hydra
Plugins: get project and jobset information from the project and jobset tables
This commit is contained in:
parent
9dc40e0816
commit
c8dc6a9419
|
@ -120,8 +120,8 @@ sub buildFinished {
|
||||||
|
|
||||||
sendEmail(
|
sendEmail(
|
||||||
$self->{config}, $to, $subject, $body,
|
$self->{config}, $to, $subject, $body,
|
||||||
[ 'X-Hydra-Project' => $topbuild->get_column('project'),
|
[ 'X-Hydra-Project' => $topbuild->jobset->get_column('project'),
|
||||||
, 'X-Hydra-Jobset' => $topbuild->get_column('jobset'),
|
, 'X-Hydra-Jobset' => $topbuild->jobset->get_column('name'),
|
||||||
, 'X-Hydra-Job' => $topbuild->get_column('job'),
|
, 'X-Hydra-Job' => $topbuild->get_column('job'),
|
||||||
, 'X-Hydra-System' => $topbuild->system
|
, 'X-Hydra-System' => $topbuild->system
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -59,7 +59,7 @@ sub buildFinished {
|
||||||
|
|
||||||
my $msg = "";
|
my $msg = "";
|
||||||
$msg .= "<img src='$img'/> ";
|
$msg .= "<img src='$img'/> ";
|
||||||
$msg .= "Job <a href='$baseurl/job/${\$topbuild->get_column('project')}/${\$topbuild->get_column('jobset')}/${\$topbuild->get_column('job')}'>${\showJobName($topbuild)}</a>";
|
$msg .= "Job <a href='$baseurl/job/${\$topbuild->jobset->get_column('project')}/${\$topbuild->jobset->get_column('name')}/${\$topbuild->get_column('job')}'>${\showJobName($topbuild)}</a>";
|
||||||
$msg .= " (and ${\scalar @deps} others)" if scalar @deps > 0;
|
$msg .= " (and ${\scalar @deps} others)" if scalar @deps > 0;
|
||||||
$msg .= ": <a href='$baseurl/build/${\$topbuild->id}'>" . showStatus($topbuild) . "</a>";
|
$msg .= ": <a href='$baseurl/build/${\$topbuild->id}'>" . showStatus($topbuild) . "</a>";
|
||||||
|
|
||||||
|
|
|
@ -111,9 +111,9 @@ sub buildFinished {
|
||||||
my $tagSet = {
|
my $tagSet = {
|
||||||
status => toBuildStatusClass($b->buildstatus),
|
status => toBuildStatusClass($b->buildstatus),
|
||||||
result => toBuildStatusDetailed($b->buildstatus),
|
result => toBuildStatusDetailed($b->buildstatus),
|
||||||
project => $b->get_column('project'),
|
project => $b->jobset->get_column('project'),
|
||||||
jobset => $b->get_column('jobset'),
|
jobset => $b->jobset->get_column('name'),
|
||||||
repo => ($b->get_column('jobset') =~ /^(.*)\.pr-/) ? $1 : $b->get_column('jobset'),
|
repo => ($b->jobset->get_column('name') =~ /^(.*)\.pr-/) ? $1 : $b->jobset->get_column('name'),
|
||||||
job => $b->get_column('job'),
|
job => $b->get_column('job'),
|
||||||
system => $b->system,
|
system => $b->system,
|
||||||
cached => $b->iscachedbuild ? "true" : "false",
|
cached => $b->iscachedbuild ? "true" : "false",
|
||||||
|
|
|
@ -140,7 +140,7 @@ sub buildFinished {
|
||||||
"danger";
|
"danger";
|
||||||
|
|
||||||
my $text = "";
|
my $text = "";
|
||||||
$text .= "Job <$baseurl/job/${\$topbuild->get_column('project')}/${\$topbuild->get_column('jobset')}/${\$topbuild->get_column('job')}|${\showJobName($topbuild)}>";
|
$text .= "Job <$baseurl/job/${\$topbuild->jobset->get_column('project')}/${\$topbuild->jobset->get_column('name')}/${\$topbuild->get_column('job')}|${\showJobName($topbuild)}>";
|
||||||
$text .= " (and ${\scalar @deps} others)" if scalar @deps > 0;
|
$text .= " (and ${\scalar @deps} others)" if scalar @deps > 0;
|
||||||
$text .= ": <$baseurl/build/${\$topbuild->id}|" . showStatus($topbuild) . ">". " in " . renderDuration($topbuild);
|
$text .= ": <$baseurl/build/${\$topbuild->id}|" . showStatus($topbuild) . ">". " in " . renderDuration($topbuild);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue