B:BD[
5.1383] → [
5.1383:1479]
∅:D[
4.87] → [
5.1539:2011]
B:BD[
5.1539] → [
5.1539:2011]
∅:D[
3.298] → [
5.2011:2645]
B:BD[
5.2011] → [
5.2011:2645]
B:BD[
5.2697] → [
5.2697:3144]
∅:D[
2.49] → [
5.3189:3319]
B:BD[
5.3189] → [
5.3189:3319]
my $json = {
event => $event,
build => $build->id,
finished => $build->get_column('finished') ? JSON::true : JSON::false,
timestamp => $build->get_column('timestamp'),
project => $build->get_column('project'),
jobset => $build->get_column('jobset'),
job => $build->get_column('job'),
drvPath => $build->get_column('drvpath'),
startTime => $build->get_column('starttime'),
stopTime => $build->get_column('stoptime'),
buildStatus => $build->get_column('buildstatus'),
nixName => $build->get_column('nixname'),
system => $build->get_column('system'),
homepage => $build->get_column('homepage'),
description => $build->get_column('description'),
license => $build->get_column('license'),
outputs => [],
products => [],
metrics => [],
};
for my $output ($build->buildoutputs) {
my $j = {
name => $output->name,
path => $output->path,
};
push @{$json->{outputs}}, $j;
}
for my $product ($build->buildproducts) {
my $j = {
productNr => $product->productnr,
type => $product->type,
subtype => $product->subtype,
fileSize => $product->filesize,
sha256hash => $product->sha256hash,
path => $product->path,
name => $product->name,
defaultPath => $product->defaultpath,
};
push @{$json->{products}}, $j;
}
for my $metric ($build->buildmetrics) {
my $j = {
name => $metric->name,
unit => $metric->unit,
value => 0 + $metric->value,
};
push @{$json->{metrics}}, $j;
}
print $tmp encode_json($json) or die;
print $tmp encode_json(makeJsonPayload($event, $build)) or die;