* Add the name of the jobset to ReleaseSetJobs, otherwise we can't
distinguish between jobs with the same name in different jobsets (e.g. "trunk" vs "stdenv-branch" for Nixpkgs). * Renamed the "attrName" field of Builds to "job". * Renamed the "id" field of BuildSteps to "build".
This commit is contained in:
@ -49,13 +49,13 @@ sub getLatestBuilds {
|
||||
|
||||
my @res = ();
|
||||
|
||||
foreach my $job ($builds->search({},
|
||||
{group_by => ['project', 'attrname', 'system']}))
|
||||
foreach my $build ($builds->search({},
|
||||
{group_by => ['project', 'job', 'system']}))
|
||||
{
|
||||
my $attrs =
|
||||
{ project => $job->get_column('project')
|
||||
, attrname => $job->attrname
|
||||
, system => $job->system
|
||||
{ project => $build->get_column('project')
|
||||
, job => $build->job
|
||||
, system => $build->system
|
||||
, finished => 1
|
||||
};
|
||||
my ($build) = $builds->search({ %$attrs, %$extraAttrs },
|
||||
|
@ -124,7 +124,7 @@ sub attrsToSQL {
|
||||
sub getPrimaryBuildsForReleaseSet {
|
||||
my ($project, $primaryJob) = @_;
|
||||
my @primaryBuilds = $project->builds->search(
|
||||
{ attrname => $primaryJob->job, finished => 1 },
|
||||
{ job => $primaryJob->job, finished => 1 },
|
||||
{ join => 'resultInfo', order_by => "timestamp DESC"
|
||||
, '+select' => ["resultInfo.releasename"], '+as' => ["releasename"]
|
||||
, where => \ attrsToSQL($primaryJob->attrs, "me.id")
|
||||
@ -154,7 +154,7 @@ sub getRelease {
|
||||
# as input. If there are multiple, prefer successful
|
||||
# ones, and then oldest. !!! order_by buildstatus is hacky
|
||||
($thisBuild) = $primaryBuild->dependentBuilds->search(
|
||||
{ attrname => $job->job, finished => 1 },
|
||||
{ job => $job->job, finished => 1 },
|
||||
{ join => 'resultInfo', rows => 1
|
||||
, order_by => ["buildstatus", "timestamp"]
|
||||
, where => \ attrsToSQL($job->attrs, "build.id")
|
||||
|
Reference in New Issue
Block a user