forked from lix-project/hydra
Make the outputs' outpaths available via the Build JSON API
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
4eef090a45
commit
5da3dcfd57
|
@ -97,6 +97,14 @@ __PACKAGE__->belongs_to(
|
||||||
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50
|
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-06-13 01:54:50
|
||||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V8MbzKvZNEaeHBJV67+ZMQ
|
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V8MbzKvZNEaeHBJV67+ZMQ
|
||||||
|
|
||||||
|
my %hint = (
|
||||||
|
columns => [
|
||||||
|
'path'
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
sub json_hint {
|
||||||
|
return \%hint;
|
||||||
|
}
|
||||||
|
|
||||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -617,7 +617,10 @@ my %hint = (
|
||||||
'busy',
|
'busy',
|
||||||
'buildstatus',
|
'buildstatus',
|
||||||
'releasename'
|
'releasename'
|
||||||
]
|
],
|
||||||
|
eager_relations => {
|
||||||
|
buildoutputs => 'name'
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
sub json_hint {
|
sub json_hint {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
use JSON;
|
use JSON;
|
||||||
use Test::Simple tests => 15;
|
use Test::Simple tests => 16;
|
||||||
|
|
||||||
my $ua = LWP::UserAgent->new;
|
my $ua = LWP::UserAgent->new;
|
||||||
$ua->cookie_jar({});
|
$ua->cookie_jar({});
|
||||||
|
@ -62,3 +62,4 @@ ok($evals->[0]->{jobsetevalinputs}->{"my-src"}->{revision} != $evals->[1]->{jobs
|
||||||
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{builds}->[0] })->content());
|
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{builds}->[0] })->content());
|
||||||
ok($build->{job} eq "job", "The build's job name is job");
|
ok($build->{job} eq "job", "The build's job name is job");
|
||||||
ok($build->{finished} == 0, "The build isn't finished yet");
|
ok($build->{finished} == 0, "The build isn't finished yet");
|
||||||
|
ok($build->{buildoutputs}->{out}->{path} =~ /^\/run\/nix\/store\/[a-zA-Z0-9]{32}-job$/, "The build's outpath is in the nix store and named 'job'");
|
||||||
|
|
Loading…
Reference in a new issue