From b0aea0863766b988158899242db282fc709db29e Mon Sep 17 00:00:00 2001 From: Johnny Bieren Date: Thu, 7 Sep 2023 13:42:46 -0400 Subject: [PATCH] feat(HACBS-2586): switch from tektonv1beta1 to tektonv1 This includes upgrading from v0.41.0 of tektoncd/pipeline to v0.49.0. Signed-off-by: Johnny Bieren --- controllers/release/adapter.go | 8 +- controllers/release/adapter_test.go | 24 +++--- controllers/release/controller.go | 5 +- controllers/release/suite_test.go | 4 +- go.mod | 47 +++++------ go.sum | 118 +++++++++++++++------------- loader/loader.go | 11 +-- loader/loader_mock.go | 7 +- loader/loader_mock_test.go | 4 +- loader/loader_test.go | 8 +- loader/suite_test.go | 4 +- main.go | 7 +- metadata/metadata_test.go | 4 +- tekton/pipeline_run.go | 60 +++++++------- tekton/pipeline_run_test.go | 28 +++---- tekton/suite_test.go | 4 +- tekton/utils.go | 6 +- 17 files changed, 183 insertions(+), 166 deletions(-) diff --git a/controllers/release/adapter.go b/controllers/release/adapter.go index 9a1cfc7f..3a1764de 100644 --- a/controllers/release/adapter.go +++ b/controllers/release/adapter.go @@ -33,7 +33,7 @@ import ( applicationapiv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" libhandler "github.com/operator-framework/operator-lib/handler" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -308,7 +308,7 @@ func (a *adapter) EnsureReleaseProcessingIsTracked() (controller.OperationResult // annotations, so it triggers Release reconciles whenever it changes. The Pipeline information and the parameters to it // will be extracted from the given ReleaseStrategy. The Release's Snapshot will also be passed to the release // PipelineRun. -func (a *adapter) createReleasePipelineRun(resources *loader.ProcessingResources) (*v1beta1.PipelineRun, error) { +func (a *adapter) createReleasePipelineRun(resources *loader.ProcessingResources) (*tektonv1.PipelineRun, error) { pipelineRun := tekton.NewReleasePipelineRun("release-pipelinerun", resources.ReleaseStrategy.Namespace). WithObjectReferences(a.release, resources.ReleasePlan, resources.ReleasePlanAdmission, resources.ReleaseStrategy, resources.Snapshot). @@ -459,7 +459,7 @@ func (a *adapter) registerDeploymentStatus(binding *applicationapiv1alpha1.Snaps } // registerProcessingData adds all the Release processing information to its Status and marks it as processing. -func (a *adapter) registerProcessingData(releasePipelineRun *v1beta1.PipelineRun, releaseStrategy *v1alpha1.ReleaseStrategy) error { +func (a *adapter) registerProcessingData(releasePipelineRun *tektonv1.PipelineRun, releaseStrategy *v1alpha1.ReleaseStrategy) error { if releasePipelineRun == nil || releaseStrategy == nil { return nil } @@ -480,7 +480,7 @@ func (a *adapter) registerProcessingData(releasePipelineRun *v1beta1.PipelineRun // registerProcessingStatus updates the status of the Release being processed by monitoring the status of the // associated release PipelineRun and setting the appropriate state in the Release. If the PipelineRun hasn't // started/succeeded, no action will be taken. -func (a *adapter) registerProcessingStatus(pipelineRun *v1beta1.PipelineRun) error { +func (a *adapter) registerProcessingStatus(pipelineRun *tektonv1.PipelineRun) error { if pipelineRun != nil && pipelineRun.IsDone() { patch := client.MergeFrom(a.release.DeepCopy()) diff --git a/controllers/release/adapter_test.go b/controllers/release/adapter_test.go index 51792b70..c0524642 100644 --- a/controllers/release/adapter_test.go +++ b/controllers/release/adapter_test.go @@ -31,7 +31,7 @@ import ( "github.com/redhat-appstudio/release-service/api/v1alpha1" "github.com/redhat-appstudio/release-service/loader" "github.com/redhat-appstudio/release-service/metadata" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -521,7 +521,7 @@ var _ = Describe("Release adapter", Ordered, func() { adapter.ctx = toolkit.GetMockedContext(ctx, []toolkit.MockData{ { ContextKey: loader.ReleasePipelineRunContextKey, - Resource: &v1beta1.PipelineRun{ + Resource: &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -540,7 +540,7 @@ var _ = Describe("Release adapter", Ordered, func() { adapter.ctx = toolkit.GetMockedContext(ctx, []toolkit.MockData{ { ContextKey: loader.ReleasePipelineRunContextKey, - Resource: &v1beta1.PipelineRun{ + Resource: &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -694,7 +694,7 @@ var _ = Describe("Release adapter", Ordered, func() { It("should track the status if the PipelineRun exists", func() { adapter.release.MarkProcessing("") - pipelineRun := &v1beta1.PipelineRun{ + pipelineRun := &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -717,7 +717,7 @@ var _ = Describe("Release adapter", Ordered, func() { It("removes the finalizer if present", func() { adapter.release.MarkProcessing("") - pipelineRun := &v1beta1.PipelineRun{ + pipelineRun := &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -757,7 +757,7 @@ var _ = Describe("Release adapter", Ordered, func() { When("createReleasePipelineRun is called", func() { var ( adapter *adapter - pipelineRun *v1beta1.PipelineRun + pipelineRun *tektonv1.PipelineRun ) AfterEach(func() { @@ -784,7 +784,7 @@ var _ = Describe("Release adapter", Ordered, func() { }) It("returns a PipelineRun", func() { - Expect(reflect.TypeOf(pipelineRun)).To(Equal(reflect.TypeOf(&v1beta1.PipelineRun{}))) + Expect(reflect.TypeOf(pipelineRun)).To(Equal(reflect.TypeOf(&tektonv1.PipelineRun{}))) }) It("has the release reference", func() { @@ -1106,7 +1106,7 @@ var _ = Describe("Release adapter", Ordered, func() { }) It("does nothing if there is no ReleaseStrategy", func() { - pipelineRun := &v1beta1.PipelineRun{ + pipelineRun := &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -1117,7 +1117,7 @@ var _ = Describe("Release adapter", Ordered, func() { }) It("registers the Release processing data", func() { - pipelineRun := &v1beta1.PipelineRun{ + pipelineRun := &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Name: "pipeline-run", Namespace: "default", @@ -1150,13 +1150,13 @@ var _ = Describe("Release adapter", Ordered, func() { }) It("does nothing if the PipelineRun is not done", func() { - pipelineRun := &v1beta1.PipelineRun{} + pipelineRun := &tektonv1.PipelineRun{} Expect(adapter.registerProcessingStatus(pipelineRun)).To(Succeed()) Expect(adapter.release.Status.Processing.CompletionTime).To(BeNil()) }) It("sets the Release as succeeded if the PipelineRun succeeded", func() { - pipelineRun := &v1beta1.PipelineRun{} + pipelineRun := &tektonv1.PipelineRun{} pipelineRun.Status.MarkSucceeded("", "") adapter.release.MarkProcessing("") @@ -1165,7 +1165,7 @@ var _ = Describe("Release adapter", Ordered, func() { }) It("sets the Release as failed if the PipelineRun didn't succeed", func() { - pipelineRun := &v1beta1.PipelineRun{} + pipelineRun := &tektonv1.PipelineRun{} pipelineRun.Status.MarkFailed("", "") adapter.release.MarkProcessing("") diff --git a/controllers/release/controller.go b/controllers/release/controller.go index 4320b1f3..be675bfe 100644 --- a/controllers/release/controller.go +++ b/controllers/release/controller.go @@ -18,6 +18,7 @@ package release import ( "context" + "github.com/redhat-appstudio/operator-toolkit/controller" "github.com/redhat-appstudio/operator-toolkit/predicates" "sigs.k8s.io/controller-runtime/pkg/cluster" @@ -30,7 +31,7 @@ import ( "github.com/redhat-appstudio/release-service/gitops" "github.com/redhat-appstudio/release-service/loader" "github.com/redhat-appstudio/release-service/tekton" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" ctrl "sigs.k8s.io/controller-runtime" @@ -99,7 +100,7 @@ func (c *Controller) Register(mgr ctrl.Manager, log *logr.Logger, _ cluster.Clus Group: "appstudio.redhat.com", }, }, builder.WithPredicates(predicates.GenerationUnchangedOnUpdatePredicate{}, gitops.DeploymentFinishedPredicate())). - Watches(&source.Kind{Type: &v1beta1.PipelineRun{}}, &libhandler.EnqueueRequestForAnnotation{ + Watches(&source.Kind{Type: &tektonv1.PipelineRun{}}, &libhandler.EnqueueRequestForAnnotation{ Type: schema.GroupKind{ Kind: "Release", Group: "appstudio.redhat.com", diff --git a/controllers/release/suite_test.go b/controllers/release/suite_test.go index 40eeb039..2c97acdb 100644 --- a/controllers/release/suite_test.go +++ b/controllers/release/suite_test.go @@ -35,7 +35,7 @@ import ( ecapiv1alpha1 "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1" appstudiov1alpha1 "github.com/redhat-appstudio/release-service/api/v1alpha1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -90,7 +90,7 @@ var _ = BeforeSuite(func() { Expect(cfg).NotTo(BeNil()) Expect(appstudiov1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) - Expect(tektonv1beta1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(tektonv1.AddToScheme(scheme.Scheme)).To(Succeed()) Expect(ecapiv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) Expect(applicationapiv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) diff --git a/go.mod b/go.mod index 9330b1f4..d624a66e 100644 --- a/go.mod +++ b/go.mod @@ -4,17 +4,17 @@ go 1.19 require ( github.com/enterprise-contract/enterprise-contract-controller/api v0.0.0-20230327185456-5befd172d558 - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/onsi/ginkgo/v2 v2.6.0 github.com/onsi/gomega v1.24.1 github.com/operator-framework/operator-lib v0.10.0 github.com/redhat-appstudio/application-api v0.0.0-20230427114540-a91722251e0a github.com/redhat-appstudio/operator-toolkit v0.0.0-20230901144515-eeb937692f03 - github.com/tektoncd/pipeline v0.41.0 + github.com/tektoncd/pipeline v0.49.0 k8s.io/api v0.26.1 - k8s.io/apimachinery v0.26.3 + k8s.io/apimachinery v0.26.5 k8s.io/client-go v0.26.1 - knative.dev/pkg v0.0.0-20221011175852-714b7630a836 + knative.dev/pkg v0.0.0-20230221145627-8efb3485adcf sigs.k8s.io/controller-runtime v0.14.6 ) @@ -22,8 +22,10 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/google/gnostic v0.6.9 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect ) require ( @@ -31,32 +33,31 @@ require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blendle/zapdriver v1.3.1 // indirect - github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/go-containerregistry v0.12.0 // indirect + github.com/google/go-containerregistry v0.15.2 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pkg/errors v0.9.1 @@ -67,32 +68,32 @@ require ( github.com/prometheus/statsd_exporter v0.22.8 // indirect github.com/redhat-appstudio/integration-service v0.0.0-20221130110641-f5453dea9623 github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.1.0 // indirect - golang.org/x/sync v0.1.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.2.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.100.0 // indirect + google.golang.org/api v0.121.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect - google.golang.org/grpc v1.50.1 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect + k8s.io/utils v0.0.0-20230209194617-a36077c30491 + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 33cc5832..3d64b0d7 100644 --- a/go.sum +++ b/go.sum @@ -56,20 +56,22 @@ github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox github.com/bradleyfalzon/ghinstallation/v2 v2.1.0 h1:5+NghM1Zred9Z078QEZtm28G/kfDfZN/92gkDlLwGVA= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudevents/sdk-go/v2 v2.12.0 h1:p1k+ysVOZtNiXfijnwB3WqZNA3y2cGOiKQygWkUHCEI= +github.com/cloudevents/sdk-go/v2 v2.14.0 h1:Nrob4FwVgi5L4tV9lhjzZcjYqFVyJzsA56CwPaPfv6s= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -109,24 +111,23 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -154,8 +155,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= @@ -173,8 +175,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.12.0 h1:nidOEtFYlgPCRqxCKj/4c/js940HVWplCWc5ftdfdUA= -github.com/google/go-containerregistry v0.12.0/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= +github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= +github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/google/go-github/v45 v45.2.0 h1:5oRLszbrkvxDDqBCNj2hjDZMKmvexaZ1xw/FCD+K3FI= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -196,8 +198,9 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -230,17 +233,17 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -310,7 +313,6 @@ github.com/redhat-appstudio/operator-toolkit v0.0.0-20230901144515-eeb937692f03 github.com/redhat-appstudio/operator-toolkit v0.0.0-20230901144515-eeb937692f03/go.mod h1:7cX2+4KGZLJ4Yoj+1v0iV5hkCGBzbSd9wkNJQjCdDJs= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -320,16 +322,21 @@ github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/tektoncd/pipeline v0.41.0 h1:FksQuX83ZRasZygQPNmaR6hKBh6gy822XxRuoKBqPUE= -github.com/tektoncd/pipeline v0.41.0/go.mod h1:YY4+PGfdsd6Qxn3PZXmCpKeS3heK8pIIcnUt37vRJ2Q= +github.com/tektoncd/pipeline v0.49.0 h1:LxpgoPZvIDiOvPj6vtInnGG0uzuQ5CPA+h8FdJdklh4= +github.com/tektoncd/pipeline v0.49.0/go.mod h1:R3Qn/oTTf1SCLrj+rCg4sqUbpx7vE+6D8Z81+zKUdqQ= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= @@ -342,8 +349,9 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -365,7 +373,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -376,6 +384,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -396,7 +406,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -442,8 +452,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -455,8 +465,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -565,7 +575,7 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -589,8 +599,8 @@ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.100.0 h1:LGUYIrbW9pzYQQ8NWXlaIVkgnfubVBZbMFb9P8TK374= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.121.0 h1:8Oopoo8Vavxx6gt+sgs8s8/X60WBAtKQq6JqnkF+xow= +google.golang.org/api v0.121.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -631,8 +641,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -649,8 +659,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -665,13 +675,15 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -702,27 +714,27 @@ k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= +k8s.io/apimachinery v0.26.5 h1:hTQVhJao2piX7vSgCn4Lwd6E0o/+TJIH4NqRf+q4EmE= +k8s.io/apimachinery v0.26.5/go.mod h1:HUvk6wrOP4v22AIYqeCGSQ6xWCHo41J9d6psb3temAg= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/pkg v0.0.0-20221011175852-714b7630a836 h1:0N7Zo/O+xeUUebJPm9keBaGclrUoEbljr3J1MsqtaIM= -knative.dev/pkg v0.0.0-20221011175852-714b7630a836/go.mod h1:DMTRDJ5WRxf/DrlOPzohzfhSuJggscLZ8EavOq9O/x8= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +knative.dev/pkg v0.0.0-20230221145627-8efb3485adcf h1:TwvZFDpkyqpK2OCAwvNGV2Zjk14FzIh8X8Ci/du3jYI= +knative.dev/pkg v0.0.0-20230221145627-8efb3485adcf/go.mod h1:VO/fcEsq43seuONRQxZyftWHjpMabYzRHDtpSEQ/eoQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/loader/loader.go b/loader/loader.go index 17914b56..8e3cdf67 100644 --- a/loader/loader.go +++ b/loader/loader.go @@ -3,15 +3,16 @@ package loader import ( "context" "fmt" - toolkit "github.com/redhat-appstudio/operator-toolkit/loader" "os" "strings" + toolkit "github.com/redhat-appstudio/operator-toolkit/loader" + ecapiv1alpha1 "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1" applicationapiv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" "github.com/redhat-appstudio/release-service/api/v1alpha1" "github.com/redhat-appstudio/release-service/metadata" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -27,7 +28,7 @@ type ObjectLoader interface { GetManagedApplication(ctx context.Context, cli client.Client, releasePlanAdmission *v1alpha1.ReleasePlanAdmission) (*applicationapiv1alpha1.Application, error) GetManagedApplicationComponents(ctx context.Context, cli client.Client, application *applicationapiv1alpha1.Application) ([]applicationapiv1alpha1.Component, error) GetRelease(ctx context.Context, cli client.Client, name, namespace string) (*v1alpha1.Release, error) - GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*v1beta1.PipelineRun, error) + GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*tektonv1.PipelineRun, error) GetReleasePlan(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*v1alpha1.ReleasePlan, error) GetReleaseStrategy(ctx context.Context, cli client.Client, releasePlanAdmission *v1alpha1.ReleasePlanAdmission) (*v1alpha1.ReleaseStrategy, error) GetSnapshot(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*applicationapiv1alpha1.Snapshot, error) @@ -163,8 +164,8 @@ func (l *loader) GetRelease(ctx context.Context, cli client.Client, name, namesp // GetReleasePipelineRun returns the PipelineRun referenced by the given Release or nil if it's not found. In the case // the List operation fails, an error will be returned. -func (l *loader) GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*v1beta1.PipelineRun, error) { - pipelineRuns := &v1beta1.PipelineRunList{} +func (l *loader) GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*tektonv1.PipelineRun, error) { + pipelineRuns := &tektonv1.PipelineRunList{} err := cli.List(ctx, pipelineRuns, client.Limit(1), client.MatchingLabels{ diff --git a/loader/loader_mock.go b/loader/loader_mock.go index 61ad167b..b43ef302 100644 --- a/loader/loader_mock.go +++ b/loader/loader_mock.go @@ -2,12 +2,13 @@ package loader import ( "context" + toolkit "github.com/redhat-appstudio/operator-toolkit/loader" ecapiv1alpha1 "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1" applicationapiv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" "github.com/redhat-appstudio/release-service/api/v1alpha1" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -112,11 +113,11 @@ func (l *mockLoader) GetRelease(ctx context.Context, cli client.Client, name, na } // GetReleasePipelineRun returns the resource and error passed as values of the context. -func (l *mockLoader) GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*v1beta1.PipelineRun, error) { +func (l *mockLoader) GetReleasePipelineRun(ctx context.Context, cli client.Client, release *v1alpha1.Release) (*tektonv1.PipelineRun, error) { if ctx.Value(ReleasePipelineRunContextKey) == nil { return l.loader.GetReleasePipelineRun(ctx, cli, release) } - return toolkit.GetMockedResourceAndErrorFromContext(ctx, ReleasePipelineRunContextKey, &v1beta1.PipelineRun{}) + return toolkit.GetMockedResourceAndErrorFromContext(ctx, ReleasePipelineRunContextKey, &tektonv1.PipelineRun{}) } // GetReleasePlan returns the resource and error passed as values of the context. diff --git a/loader/loader_mock_test.go b/loader/loader_mock_test.go index 8fad2b43..45928b8f 100644 --- a/loader/loader_mock_test.go +++ b/loader/loader_mock_test.go @@ -8,7 +8,7 @@ import ( . "github.com/onsi/gomega" applicationapiv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" "github.com/redhat-appstudio/release-service/api/v1alpha1" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" ) var _ = Describe("Release Adapter", Ordered, func() { @@ -142,7 +142,7 @@ var _ = Describe("Release Adapter", Ordered, func() { When("calling GetReleasePipelineRun", func() { It("returns the resource and error from the context", func() { - pipelineRun := &v1beta1.PipelineRun{} + pipelineRun := &tektonv1.PipelineRun{} mockContext := toolkit.GetMockedContext(ctx, []toolkit.MockData{ { ContextKey: ReleasePipelineRunContextKey, diff --git a/loader/loader_test.go b/loader/loader_test.go index c9ae14e7..851024a4 100644 --- a/loader/loader_test.go +++ b/loader/loader_test.go @@ -12,7 +12,7 @@ import ( applicationapiv1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1" "github.com/redhat-appstudio/release-service/api/v1alpha1" "github.com/redhat-appstudio/release-service/metadata" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -30,7 +30,7 @@ var _ = Describe("Release Adapter", Ordered, func() { enterpriseContractConfigMap *corev1.ConfigMap enterpriseContractPolicy *ecapiv1alpha1.EnterpriseContractPolicy environment *applicationapiv1alpha1.Environment - pipelineRun *v1beta1.PipelineRun + pipelineRun *tektonv1.PipelineRun release *v1alpha1.Release releasePlan *v1alpha1.ReleasePlan releasePlanAdmission *v1alpha1.ReleasePlanAdmission @@ -191,7 +191,7 @@ var _ = Describe("Release Adapter", Ordered, func() { It("returns a PipelineRun if the labels match with the release data", func() { returnedObject, err := loader.GetReleasePipelineRun(ctx, k8sClient, release) Expect(err).NotTo(HaveOccurred()) - Expect(returnedObject).NotTo(Equal(&v1beta1.PipelineRun{})) + Expect(returnedObject).NotTo(Equal(&tektonv1.PipelineRun{})) Expect(returnedObject.Name).To(Equal(pipelineRun.Name)) }) @@ -454,7 +454,7 @@ var _ = Describe("Release Adapter", Ordered, func() { } Expect(k8sClient.Create(ctx, release)).To(Succeed()) - pipelineRun = &v1beta1.PipelineRun{ + pipelineRun = &tektonv1.PipelineRun{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ metadata.ReleaseNameLabel: release.Name, diff --git a/loader/suite_test.go b/loader/suite_test.go index 02bea9ac..f2dc99e8 100644 --- a/loader/suite_test.go +++ b/loader/suite_test.go @@ -27,7 +27,7 @@ import ( "github.com/redhat-appstudio/operator-toolkit/test" appstudiov1alpha1 "github.com/redhat-appstudio/release-service/api/v1alpha1" "github.com/redhat-appstudio/release-service/cache" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" ctrl "sigs.k8s.io/controller-runtime" . "github.com/onsi/ginkgo/v2" @@ -88,7 +88,7 @@ var _ = BeforeSuite(func() { Expect(cfg).NotTo(BeNil()) Expect(appstudiov1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) - Expect(tektonv1beta1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(tektonv1.AddToScheme(scheme.Scheme)).To(Succeed()) Expect(ecapiv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) Expect(applicationapiv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) diff --git a/main.go b/main.go index 08a1b11b..b01a50ce 100644 --- a/main.go +++ b/main.go @@ -18,10 +18,11 @@ package main import ( "flag" + "os" + "github.com/redhat-appstudio/operator-toolkit/controller" "github.com/redhat-appstudio/operator-toolkit/webhook" "github.com/redhat-appstudio/release-service/api/v1alpha1/webhooks" - "os" "go.uber.org/zap/zapcore" @@ -39,7 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" appstudiov1alpha1 "github.com/redhat-appstudio/release-service/api/v1alpha1" "github.com/redhat-appstudio/release-service/controllers" @@ -56,7 +57,7 @@ func init() { utilruntime.Must(appstudiov1alpha1.AddToScheme(scheme)) utilruntime.Must(applicationapiv1alpha1.AddToScheme(scheme)) utilruntime.Must(ecapiv1alpha1.AddToScheme(scheme)) - utilruntime.Must(tektonv1beta1.AddToScheme(scheme)) + utilruntime.Must(tektonv1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index a04ea7c9..4ac5ed3f 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -132,7 +132,7 @@ var _ = Describe("Metadata", func() { Context("AddAnnotations function", func() { When("called with a pipelineRun containing nil Annotations", func() { - pipelineRun := &v1beta1.PipelineRun{ + pipelineRun := &tektonv1.PipelineRun{ ObjectMeta: v1.ObjectMeta{ Annotations: nil, Labels: nil, diff --git a/tekton/pipeline_run.go b/tekton/pipeline_run.go index b35497ed..a98425d5 100644 --- a/tekton/pipeline_run.go +++ b/tekton/pipeline_run.go @@ -34,7 +34,7 @@ import ( libhandler "github.com/operator-framework/operator-lib/handler" integrationServiceGitopsPkg "github.com/redhat-appstudio/integration-service/gitops" "github.com/redhat-appstudio/release-service/api/v1alpha1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -49,25 +49,25 @@ const ( // ReleasePipelineRun is a PipelineRun alias, so we can add new methods to it in this file. type ReleasePipelineRun struct { - tektonv1beta1.PipelineRun + tektonv1.PipelineRun } // NewReleasePipelineRun creates an empty PipelineRun in the given namespace. The name will be autogenerated, // using the prefix passed as an argument to the function. func NewReleasePipelineRun(prefix, namespace string) *ReleasePipelineRun { - pipelineRun := tektonv1beta1.PipelineRun{ + pipelineRun := tektonv1.PipelineRun{ ObjectMeta: v1.ObjectMeta{ GenerateName: prefix + "-", Namespace: namespace, }, - Spec: tektonv1beta1.PipelineRunSpec{}, + Spec: tektonv1.PipelineRunSpec{}, } return &ReleasePipelineRun{pipelineRun} } // AsPipelineRun casts the ReleasePipelineRun to PipelineRun, so it can be used in the Kubernetes client. -func (r *ReleasePipelineRun) AsPipelineRun() *tektonv1beta1.PipelineRun { +func (r *ReleasePipelineRun) AsPipelineRun() *tektonv1.PipelineRun { return &r.PipelineRun } @@ -76,8 +76,8 @@ func (r *ReleasePipelineRun) WithEnterpriseContractConfigMap(ecConfig *corev1.Co gitResolverFields := []string{"verify_ec_task_git_url", "verify_ec_task_git_revision", "verify_ec_task_git_pathInRepo"} for _, field := range gitResolverFields { - r.WithExtraParam(field, tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + r.WithExtraParam(field, tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: ecConfig.Data[string(field)], }) } @@ -92,8 +92,8 @@ func (r *ReleasePipelineRun) WithEnterpriseContractPolicy(enterpriseContractPoli policyKindRunes := []rune(enterpriseContractPolicy.Kind) policyKindRunes[0] = unicode.ToLower(policyKindRunes[0]) - r.WithExtraParam(string(policyKindRunes), tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + r.WithExtraParam(string(policyKindRunes), tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: string(policyJson), }) @@ -102,8 +102,8 @@ func (r *ReleasePipelineRun) WithEnterpriseContractPolicy(enterpriseContractPoli // WithExtraParam adds an extra param to the release PipelineRun. If the parameter is not part of the Pipeline // definition, it will be silently ignored. -func (r *ReleasePipelineRun) WithExtraParam(name string, value tektonv1beta1.ArrayOrString) *ReleasePipelineRun { - r.Spec.Params = append(r.Spec.Params, tektonv1beta1.Param{ +func (r *ReleasePipelineRun) WithExtraParam(name string, value tektonv1.ParamValue) *ReleasePipelineRun { + r.Spec.Params = append(r.Spec.Params, tektonv1.Param{ Name: name, Value: value, }) @@ -116,8 +116,8 @@ func (r *ReleasePipelineRun) WithExtraParam(name string, value tektonv1beta1.Arr // in the form of "namespace/name". func (r *ReleasePipelineRun) WithObjectReferences(objects ...client.Object) *ReleasePipelineRun { for _, object := range objects { - r.WithExtraParam(strings.ToLower(object.GetObjectKind().GroupVersionKind().Kind), tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + r.WithExtraParam(strings.ToLower(object.GetObjectKind().GroupVersionKind().Kind), tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: fmt.Sprintf("%s%c%s", object.GetNamespace(), types.Separator, object.GetName()), }) } @@ -151,14 +151,14 @@ func (r *ReleasePipelineRun) WithReleaseAndApplicationMetadata(release *v1alpha1 func (r *ReleasePipelineRun) WithReleaseStrategy(strategy *v1alpha1.ReleaseStrategy) *ReleasePipelineRun { r.Spec.PipelineRef = getPipelineRef(strategy) - valueType := tektonv1beta1.ParamTypeString + valueType := tektonv1.ParamTypeString for _, param := range strategy.Spec.Params { if len(param.Values) > 0 { - valueType = tektonv1beta1.ParamTypeArray + valueType = tektonv1.ParamTypeArray } - r.WithExtraParam(param.Name, tektonv1beta1.ArrayOrString{ + r.WithExtraParam(param.Name, tektonv1.ParamValue{ Type: valueType, StringVal: param.Value, ArrayVal: param.Values, @@ -179,7 +179,7 @@ func (r *ReleasePipelineRun) WithReleaseStrategy(strategy *v1alpha1.ReleaseStrat // WithServiceAccount adds a reference to the service account to be used to gain elevated privileges during the // execution of the different Pipeline tasks. func (r *ReleasePipelineRun) WithServiceAccount(serviceAccount string) *ReleasePipelineRun { - r.Spec.ServiceAccountName = serviceAccount + r.Spec.TaskRunTemplate.ServiceAccountName = serviceAccount return r } @@ -191,7 +191,7 @@ func (r *ReleasePipelineRun) WithWorkspace(name, persistentVolumeClaim string) * return r } - r.Spec.Workspaces = append(r.Spec.Workspaces, tektonv1beta1.WorkspaceBinding{ + r.Spec.Workspaces = append(r.Spec.Workspaces, tektonv1.WorkspaceBinding{ Name: name, PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{ ClaimName: persistentVolumeClaim, @@ -202,28 +202,28 @@ func (r *ReleasePipelineRun) WithWorkspace(name, persistentVolumeClaim string) * } // getBundleResolver returns a bundle ResolverRef for the given bundle and pipeline. -func getBundleResolver(bundle, pipeline string) tektonv1beta1.ResolverRef { - return tektonv1beta1.ResolverRef{ +func getBundleResolver(bundle, pipeline string) tektonv1.ResolverRef { + return tektonv1.ResolverRef{ Resolver: "bundles", - Params: []tektonv1beta1.Param{ + Params: []tektonv1.Param{ { Name: "bundle", - Value: tektonv1beta1.ParamValue{ - Type: tektonv1beta1.ParamTypeString, + Value: tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: bundle, }, }, { Name: "kind", - Value: tektonv1beta1.ParamValue{ - Type: tektonv1beta1.ParamTypeString, + Value: tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: "pipeline", }, }, { Name: "name", - Value: tektonv1beta1.ParamValue{ - Type: tektonv1beta1.ParamTypeString, + Value: tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: pipeline, }, }, @@ -232,14 +232,14 @@ func getBundleResolver(bundle, pipeline string) tektonv1beta1.ResolverRef { } // getPipelineRef returns a PipelineRef generated from the information specified in the given ReleaseStrategy. -func getPipelineRef(strategy *v1alpha1.ReleaseStrategy) *tektonv1beta1.PipelineRef { +func getPipelineRef(strategy *v1alpha1.ReleaseStrategy) *tektonv1.PipelineRef { if strategy.Spec.Bundle == "" { - return &tektonv1beta1.PipelineRef{ + return &tektonv1.PipelineRef{ Name: strategy.Spec.Pipeline, } } - return &tektonv1beta1.PipelineRef{ + return &tektonv1.PipelineRef{ ResolverRef: getBundleResolver(strategy.Spec.Bundle, strategy.Spec.Pipeline), } } diff --git a/tekton/pipeline_run_test.go b/tekton/pipeline_run_test.go index 2f892117..ea55738e 100644 --- a/tekton/pipeline_run_test.go +++ b/tekton/pipeline_run_test.go @@ -34,13 +34,13 @@ import ( "github.com/redhat-appstudio/release-service/api/v1alpha1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type ExtraParams struct { Name string - Value tektonv1beta1.ArrayOrString + Value tektonv1.ParamValue } var _ = Describe("PipelineRun", func() { @@ -64,8 +64,8 @@ var _ = Describe("PipelineRun", func() { BeforeEach(func() { extraParams = &ExtraParams{ Name: "extraConfigPath", - Value: tektonv1beta1.ArrayOrString{ - Type: tektonv1beta1.ParamTypeString, + Value: tektonv1.ParamValue{ + Type: tektonv1.ParamTypeString, StringVal: "path/to/extra/config.yaml", }, } @@ -189,13 +189,13 @@ var _ = Describe("PipelineRun", func() { It("can return a PipelineRun object from a PipelineRun object", func() { Expect(reflect.TypeOf(releasePipelineRun.AsPipelineRun())). - To(Equal(reflect.TypeOf(&tektonv1beta1.PipelineRun{}))) + To(Equal(reflect.TypeOf(&tektonv1.PipelineRun{}))) }) It("can add the ReleaseStrategy information and bundle resolver if present to a PipelineRun object ", func() { releasePipelineRun.WithReleaseStrategy(strategy) - Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef).NotTo(Equal(tektonv1beta1.ResolverRef{})) - Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef.Resolver).To(Equal(tektonv1beta1.ResolverName("bundles"))) + Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef).NotTo(Equal(tektonv1.ResolverRef{})) + Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef.Resolver).To(Equal(tektonv1.ResolverName("bundles"))) Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef.Params).To(HaveLen(3)) Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef.Params[0].Name).To(Equal("bundle")) Expect(releasePipelineRun.Spec.PipelineRef.ResolverRef.Params[0].Value.StringVal).To(Equal(strategy.Spec.Bundle)) @@ -207,7 +207,7 @@ var _ = Describe("PipelineRun", func() { It("can add the reference to the service account that should be used", func() { releasePipelineRun.WithServiceAccount(serviceAccountName) - Expect(releasePipelineRun.Spec.ServiceAccountName).To(Equal(serviceAccountName)) + Expect(releasePipelineRun.Spec.TaskRunTemplate.ServiceAccountName).To(Equal(serviceAccountName)) }) It("can add a workspace to the PipelineRun using the given name and PVC", func() { @@ -256,7 +256,7 @@ var _ = Describe("PipelineRun", func() { Expect(releasePipelineRun.Spec.Params).To(HaveLen(1)) Expect(releasePipelineRun.Spec.Params[0].Name).To(Equal(strings.ToLower(release.Kind))) - Expect(releasePipelineRun.Spec.Params[0].Value.Type).To(Equal(tektonv1beta1.ParamTypeString)) + Expect(releasePipelineRun.Spec.Params[0].Value.Type).To(Equal(tektonv1.ParamTypeString)) Expect(releasePipelineRun.Spec.Params[0].Value.StringVal).To(Equal( fmt.Sprintf("%s%c%s", release.Namespace, types.Separator, release.Name))) }) @@ -304,14 +304,14 @@ var _ = Describe("PipelineRun", func() { pipelineRef := getPipelineRef(releaseStrategy) Expect(pipelineRef.Name).To(Equal(releaseStrategy.Spec.Pipeline)) - Expect(pipelineRef.ResolverRef).To(Equal(tektonv1beta1.ResolverRef{})) + Expect(pipelineRef.ResolverRef).To(Equal(tektonv1.ResolverRef{})) }) It("should return a PipelineRef with a bundle resolver if the releaseStrategy contains a bundle", func() { pipelineRef := getPipelineRef(strategy) Expect(pipelineRef.Name).To(BeEmpty()) - Expect(pipelineRef.ResolverRef).NotTo(Equal(tektonv1beta1.ResolverRef{})) - Expect(pipelineRef.ResolverRef.Resolver).To(Equal(tektonv1beta1.ResolverName("bundles"))) + Expect(pipelineRef.ResolverRef).NotTo(Equal(tektonv1.ResolverRef{})) + Expect(pipelineRef.ResolverRef.Resolver).To(Equal(tektonv1.ResolverName("bundles"))) Expect(pipelineRef.ResolverRef.Params).To(HaveLen(3)) Expect(pipelineRef.ResolverRef.Params[0].Name).To(Equal("bundle")) Expect(pipelineRef.ResolverRef.Params[0].Value.StringVal).To(Equal(strategy.Spec.Bundle)) @@ -325,8 +325,8 @@ var _ = Describe("PipelineRun", func() { When("calling getBundleResolver", func() { It("should return a bundle resolver referencing the releaseStrategy Bundle and Pipeline", func() { bundleResolver := getBundleResolver(strategy.Spec.Bundle, strategy.Spec.Pipeline) - Expect(bundleResolver).NotTo(Equal(tektonv1beta1.ResolverRef{})) - Expect(bundleResolver.Resolver).To(Equal(tektonv1beta1.ResolverName("bundles"))) + Expect(bundleResolver).NotTo(Equal(tektonv1.ResolverRef{})) + Expect(bundleResolver.Resolver).To(Equal(tektonv1.ResolverName("bundles"))) Expect(bundleResolver.Params).To(HaveLen(3)) Expect(bundleResolver.Params[0].Name).To(Equal("bundle")) Expect(bundleResolver.Params[0].Value.StringVal).To(Equal(strategy.Spec.Bundle)) diff --git a/tekton/suite_test.go b/tekton/suite_test.go index 40bb57a8..8ff13d1e 100644 --- a/tekton/suite_test.go +++ b/tekton/suite_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" appstudiov1alpha1 "github.com/redhat-appstudio/release-service/api/v1alpha1" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" clientsetscheme "k8s.io/client-go/kubernetes/scheme" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -86,7 +86,7 @@ var _ = BeforeSuite(func() { err = applicationapiv1alpha1.AddToScheme(clientsetscheme.Scheme) Expect(err).NotTo(HaveOccurred()) - err = tektonv1beta1.AddToScheme(clientsetscheme.Scheme) + err = tektonv1.AddToScheme(clientsetscheme.Scheme) Expect(err).NotTo(HaveOccurred()) //+kubebuilder:scaffold:scheme diff --git a/tekton/utils.go b/tekton/utils.go index 3bd337d7..4d300d40 100644 --- a/tekton/utils.go +++ b/tekton/utils.go @@ -18,14 +18,14 @@ package tekton import ( "github.com/redhat-appstudio/release-service/metadata" - tektonv1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1" + tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1" "knative.dev/pkg/apis" "sigs.k8s.io/controller-runtime/pkg/client" ) // isReleasePipelineRun returns a boolean indicating whether the object passed is a release PipelineRun or not. func isReleasePipelineRun(object client.Object) bool { - _, ok := object.(*tektonv1beta1.PipelineRun) + _, ok := object.(*tektonv1.PipelineRun) if !ok { return false } @@ -38,7 +38,7 @@ func isReleasePipelineRun(object client.Object) bool { // hasPipelineSucceeded returns a boolean indicating whether the PipelineRun succeeded or not. // If the object passed to this function is not a PipelineRun, the function will return false. func hasPipelineSucceeded(object client.Object) bool { - if pipelineRun, ok := object.(*tektonv1beta1.PipelineRun); ok { + if pipelineRun, ok := object.(*tektonv1.PipelineRun); ok { return !pipelineRun.Status.GetCondition(apis.ConditionSucceeded).IsUnknown() }