(containing the latest successful build of each job) and "all" (containing all successful builds ever).
AKAZKCR6GFCZQBR2ZJSZEI3SXW4S25V7X7JGHUYNUITQQSAVAF5AC
WJ35RSKAACPQU7M2GEL7EW5H4NCYVRSEPEJJIALKG2J56ZS6Q7PQC
FYWE74AAKTK5QZBRJLAV6JLEFCKW4RYL4XLUVLD3UXQEAISKJCXAC
7UJ5YV4VUSXMKB57KKXDG6KLIXMQXO45VO5UTOT46BHQJBFZ7XKQC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
UVMFS73TI6RARMAAGY2UVS5LCPZUKLQECXQQVER4F7S4BNUXQQ3AC
ELCI5T2ALF37VXYM5POHPO3CAMMPRB65BXGDRVUAZG53NKKLGIEAC
7LKUAIGCURNGNBBOAGK4EYIUF6KNWHJNLA6ZJEXFLA5HUADAJP6QC
WYN733STK5DUQSWHSS6EYZK32KPZII64HLX4NS7TYUSFZ6AAFLGAC
L2E6EVE2RVFVDCUNRJ4CZYSQNS2DZUA5DTBETHBDUQUV2KQQRAOQC
2JQ7WEFMU5IPCUKLGRLVVT4MYMKVHJDZVMOOOPL6K5RLEZ532LGQC
LVJKRTIK5WOWWAZ454B4DCCGETOIQJK5TLOWMZVNY2B4AEGF2GMAC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
sub nix : Chained('get_builds') PathPart('channel') CaptureArgs(1) {
my ($self, $c, $channelName) = @_;
eval {
if ($channelName eq "latest") {
$c->stash->{channelName} = $c->stash->{channelBaseName} . "-latest";
getChannelData($c, getLatestBuilds($c, $c->stash->{allBuilds}, {buildStatus => 0}));
}
elsif ($channelName eq "all") {
$c->stash->{channelName} = $c->stash->{channelBaseName} . "-all";
getChannelData($c, [$c->stash->{allBuilds}->all]);
}
else {
error($c, "Unknown channel `$channelName'.");
}
};
error($c, $@) if $@;
}
# 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 $@;
}
}
sub nix : Chained('/') PathPart('channel/latest') CaptureArgs(0) {
my ($self, $c) = @_;
eval {
$c->stash->{channelName} = "hydra-all-latest";
getChannelData($c, $c->model('DB::Builds'));
};
error($c, $@) if $@;