From 6e33fda2711515d197c36466f4300ed576b75783 Mon Sep 17 00:00:00 2001 From: encalada Date: Tue, 13 Feb 2024 14:22:56 +0100 Subject: [PATCH] Support timestamp result conversion From beta to alpha --- pkg/apis/build/v1beta1/buildrun_conversion.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/apis/build/v1beta1/buildrun_conversion.go b/pkg/apis/build/v1beta1/buildrun_conversion.go index a7159cfea9..8c470713c1 100644 --- a/pkg/apis/build/v1beta1/buildrun_conversion.go +++ b/pkg/apis/build/v1beta1/buildrun_conversion.go @@ -115,7 +115,9 @@ func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructur // Note: v1alpha contains a Name field under the SourceResult // object, which we dont set here. sourceStatus = append(sourceStatus, v1alpha1.SourceResult{ - Git: (*v1alpha1.GitSourceResult)(src.Status.Source.Git), + Name: "default", + Git: (*v1alpha1.GitSourceResult)(src.Status.Source.Git), + Timestamp: src.Status.Source.Timestamp, }) } @@ -123,7 +125,9 @@ func (src *BuildRun) ConvertTo(ctx context.Context, obj *unstructured.Unstructur // Note: v1alpha contains a Name field under the SourceResult // object, which we dont set here. sourceStatus = append(sourceStatus, v1alpha1.SourceResult{ - Bundle: (*v1alpha1.BundleSourceResult)(src.Status.Source.OciArtifact), + Name: "default", + Bundle: (*v1alpha1.BundleSourceResult)(src.Status.Source.OciArtifact), + Timestamp: src.Status.Source.Timestamp, }) }