Merge pull request #1116 from DeterminateSystems/project-jobset/input-type-build

Project jobset: update input type "build"
This commit is contained in:
Graham Christensen 2022-01-15 12:48:20 -05:00 committed by GitHub
commit 9d3b14dd43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,9 +106,17 @@ sub fetchInputBuild {
$projectName ||= $project->name;
$jobsetName ||= $jobset->name;
my $jobset = $db->resultset('Jobsets')->search(
{
name => $jobsetName,
project => $projectName,
},
{}
)->single;
# Pick the most recent successful build of the specified job.
$prevBuild = $db->resultset('Builds')->search(
{ finished => 1, project => $projectName, jobset => $jobsetName
{ finished => 1, jobset_id => $jobset->get_column('id')
, job => $jobName, buildStatus => 0 },
{ order_by => "me.id DESC", rows => 1
, where => \ attrsToSQL($attrs, "me.id") })->single;