Skip to content

Commit

Permalink
chore(deps): align spectrum
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Jun 20, 2023
1 parent 473645c commit 4b45846
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require (
github.com/fsnotify/fsnotify v1.6.0
github.com/gertd/go-pluralize v0.2.1
github.com/go-logr/logr v1.2.4
github.com/google/go-containerregistry v0.15.2
github.com/google/go-github/v52 v52.0.0
github.com/google/uuid v1.3.0
github.com/jpillora/backoff v1.0.0
Expand Down Expand Up @@ -101,6 +100,7 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-containerregistry v0.13.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
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.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-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k=
github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo=
github.com/google/go-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M=
github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/catalog/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
"github.com/apache/camel-k/v2/pkg/util/s2i"

spectrum "github.com/container-tools/spectrum/pkg/builder"
gcrv1 "github.com/google/go-containerregistry/pkg/v1"

buildv1 "github.com/openshift/api/build/v1"
imagev1 "github.com/openshift/api/image/v1"
Expand Down Expand Up @@ -179,6 +178,7 @@ func initializeS2i(ctx context.Context, c client.Client, ip *v1.IntegrationPlatf
USER 1000
ADD /usr/local/bin/kamel /usr/local/bin/kamel
ADD /usr/share/maven/mvnw/ /usr/share/maven/mvnw/
ADD ` + defaults.LocalRepository + ` ` + defaults.LocalRepository + `
`))

owner := catalogReference(catalog)
Expand Down Expand Up @@ -383,13 +383,13 @@ func imageExistsSpectrum(options spectrum.Options) bool {
Log.Infof("Checking if Camel K builder container %s already exists...", options.Base)
ctrImg, err := spectrum.Pull(options)
if ctrImg != nil && err == nil {
var hash gcrv1.Hash
if hash, err = ctrImg.Digest(); err != nil {
if hash, err := ctrImg.Digest(); err != nil {
Log.Errorf(err, "Cannot calculate digest")
return false
} else {
Log.Infof("Found Camel K builder container with digest %s", hash.String())
return true
}
Log.Infof("Found Camel K builder container with digest %s", hash.String())
return true
}

Log.Infof("Couldn't pull image due to %s", err.Error())
Expand Down

0 comments on commit 4b45846

Please sign in to comment.