succesful builds for each job in the project (under http://server/project/<name>/channel/latest).
7UJ5YV4VUSXMKB57KKXDG6KLIXMQXO45VO5UTOT46BHQJBFZ7XKQC
PCK2Q2VOAZBNDXVHHGOGKK4ATOA6HKARYPBFGTMH672GANWBHWWQC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
2JQ7WEFMU5IPCUKLGRLVVT4MYMKVHJDZVMOOOPL6K5RLEZ532LGQC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
K2NXFFKHZL7JUHSIIHJCWPWZOS4KUAJ7R7HH6JXC4TLLICMSVQCQC
LVJKRTIK5WOWWAZ454B4DCCGETOIQJK5TLOWMZVNY2B4AEGF2GMAC
BPVJBR2PWGL3LA2GVDKURHA6RUQZGNKV4QVLHQXYBHPSNCM26E5AC
CS7T2XFIISZ7TPQ6FFRIDYPR6BDCQHURP4JE4YKLI4OYSNWKZCHAC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
}
# Hydra::Base::Controller::NixChannel needs this.
sub nix : Chained('project') PathPart('channel/latest') CaptureArgs(0) {
my ($self, $c) = @_;
eval {
$c->stash->{channelName} = $c->stash->{curProject}->name . "-latest";
getChannelData($c, scalar $c->stash->{curProject}->builds);
};
error($c, $@) if $@;
$c->stash->{channelName} = "hydra-all-latest";
my @builds = @{getLatestBuilds($c, $c->model('DB::Builds'), {buildStatus => 0})};
my @storePaths = ();
foreach my $build (@builds) {
# !!! better do this in getLatestBuilds with a join.
next unless $build->buildproducts->find({type => "nix-build"});
next unless isValidPath($build->outpath);
push @storePaths, $build->outpath;
my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id . ".nixpkg";
$c->stash->{nixPkgs}->{$pkgName} = $build;
eval {
$c->stash->{channelName} = "hydra-all-latest";
getChannelData($c, $c->model('DB::Builds'));
}
sub getChannelData {
my ($c, $builds) = @_;
my @builds = @{getLatestBuilds($c, $builds, {buildStatus => 0})};
my @storePaths = ();
foreach my $build (@builds) {
# !!! better do this in getLatestBuilds with a join.
next unless $build->buildproducts->find({type => "nix-build"});
next unless isValidPath($build->outpath);
push @storePaths, $build->outpath;
my $pkgName = $build->nixname . "-" . $build->system . "-" . $build->id . ".nixpkg";
$c->stash->{nixPkgs}->{$pkgName} = $build;
};
$c->stash->{storePaths} = [@storePaths];