Skip to content

Commit 32e311f

Browse files
Merge pull request #1510 from Adarsh-jaiss/build-bugs
[fixed] : Order of Local Source between Builds and BuildRuns
2 parents d084af1 + cf1999e commit 32e311f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/reconciler/buildrun/resources/sources.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@ func isLocalCopyBuildSource(
2929
buildRun *buildv1beta1.BuildRun,
3030
) *buildv1beta1.Local {
3131

32-
// Note: In v1alpha1 we will append all sources across builds and buildruns, and then return
33-
// the first source of type Local.
34-
if build.Spec.Source.Type == buildv1beta1.LocalType {
35-
return build.Spec.Source.LocalSource
36-
}
37-
3832
if buildRun.Spec.Source != nil && buildRun.Spec.Source.Type == buildv1beta1.LocalType {
3933
return buildRun.Spec.Source.LocalSource
4034
}
4135

36+
if build.Spec.Source.Type == buildv1beta1.LocalType {
37+
return build.Spec.Source.LocalSource
38+
}
39+
4240
return nil
4341
}
4442

0 commit comments

Comments
 (0)