Skip to content

Commit

Permalink
Merge pull request #1510 from Adarsh-jaiss/build-bugs
Browse files Browse the repository at this point in the history
[fixed] : Order of Local Source between Builds and BuildRuns
  • Loading branch information
openshift-merge-bot[bot] authored Feb 29, 2024
2 parents d084af1 + cf1999e commit 32e311f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/reconciler/buildrun/resources/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ func isLocalCopyBuildSource(
buildRun *buildv1beta1.BuildRun,
) *buildv1beta1.Local {

// Note: In v1alpha1 we will append all sources across builds and buildruns, and then return
// the first source of type Local.
if build.Spec.Source.Type == buildv1beta1.LocalType {
return build.Spec.Source.LocalSource
}

if buildRun.Spec.Source != nil && buildRun.Spec.Source.Type == buildv1beta1.LocalType {
return buildRun.Spec.Source.LocalSource
}

if build.Spec.Source.Type == buildv1beta1.LocalType {
return build.Spec.Source.LocalSource
}

return nil
}

Expand Down

0 comments on commit 32e311f

Please sign in to comment.