forked from lix-project/hydra
BitBucketStatus: $build -> $topbuild, $b -> $build (perlcritic)
This commit is contained in:
parent
bcf37ab705
commit
3920bf1df3
|
@ -22,21 +22,21 @@ sub toBitBucketState {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub common {
|
sub common {
|
||||||
my ($self, $build, $dependents, $finished) = @_;
|
my ($self, $topbuild, $dependents, $finished) = @_;
|
||||||
my $bitbucket = $self->{config}->{bitbucket};
|
my $bitbucket = $self->{config}->{bitbucket};
|
||||||
my $baseurl = $self->{config}->{'base_uri'} || "http://localhost:3000";
|
my $baseurl = $self->{config}->{'base_uri'} || "http://localhost:3000";
|
||||||
|
|
||||||
foreach my $b ($build, @{$dependents}) {
|
foreach my $build ($topbuild, @{$dependents}) {
|
||||||
my $jobName = showJobName $b;
|
my $jobName = showJobName $build;
|
||||||
my $evals = $build->jobsetevals;
|
my $evals = $topbuild->jobsetevals;
|
||||||
my $ua = LWP::UserAgent->new();
|
my $ua = LWP::UserAgent->new();
|
||||||
my $body = encode_json(
|
my $body = encode_json(
|
||||||
{
|
{
|
||||||
state => $finished ? toBitBucketState($b->buildstatus) : "INPROGRESS",
|
state => $finished ? toBitBucketState($tbuild->buildstatus) : "INPROGRESS",
|
||||||
url => "$baseurl/build/" . $b->id,
|
url => "$baseurl/build/" . $tbuild->id,
|
||||||
name => $jobName,
|
name => $jobName,
|
||||||
key => $b->id,
|
key => $tbuild->id,
|
||||||
description => "Hydra build #" . $b->id . " of $jobName",
|
description => "Hydra build #" . $tbuild->id . " of $jobName",
|
||||||
});
|
});
|
||||||
while (my $eval = $evals->next) {
|
while (my $eval = $evals->next) {
|
||||||
foreach my $i ($eval->jobsetevalinputs){
|
foreach my $i ($eval->jobsetevalinputs){
|
||||||
|
|
Loading…
Reference in a new issue