Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
[SRVKS-316] Cherry pick go-containerregistry update and use workaroun…
Browse files Browse the repository at this point in the history
…d build flag. (#413)

* Use buildflag to workaround gcp behavior.

* [CP] Update go-containerregistry to the latest revision. (knative#7106)

* Update go-containerregistry to the latest revision.

* Fix date.

* Use proper location for flag.

Co-authored-by: Knative Prow Robot <[email protected]>
  • Loading branch information
markusthoemmes and knative-prow-robot authored Mar 11, 2020
1 parent 7a381d4 commit f73202b
Show file tree
Hide file tree
Showing 217 changed files with 13,324 additions and 8,075 deletions.
118 changes: 74 additions & 44 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ required = [
name = "go.uber.org/zap"
revision = "67bc79d13d155c02fd008f721863ff8cc5f30659"

[[constraint]]
name = "github.com/google/go-containerregistry"
# HEAD as of 2019-09-10
revision = "b02d448a3705facf11018efff34f1d2830be5724"

[[constraint]]
name = "github.com/jetstack/cert-manager"
version = "v0.12.0"
Expand Down Expand Up @@ -144,6 +139,23 @@ required = [
unused-packages = false
non-go = false

# The dependencies below are required for go-containrregistry.
[[constraint]]
name = "github.com/google/go-containerregistry"
# HEAD as of 2020-02-27
revision = "ba53fa10e72c7373ef8068e21c9f102f0c20a940"

[[override]]
name = "github.com/vdemeester/k8s-pkg-credentialprovider"
version = "v1.13.12.1"

[[override]]
name = "github.com/Azure/azure-sdk-for-go"
version = "v38.0.0"

[[override]]
name = "github.com/Azure/go-autorest"
version = "autorest/v0.9.3"

# The dependencies below are required for opencensus.
[[override]]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST_IMAGES=$(shell find ./test/test_images -mindepth 1 -maxdepth 1 -type d)

install:
for img in $(CORE_IMAGES); do \
go install $$img ; \
go install -tags="disable_gcp" $$img ; \
done
.PHONY: install

Expand Down
2 changes: 1 addition & 1 deletion openshift/productization/dist-git/Dockerfile.activator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/activator ./cmd/activator

FROM ubi8-minimal:8-released
Expand Down
2 changes: 1 addition & 1 deletion openshift/productization/dist-git/Dockerfile.autoscaler
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/autoscaler ./cmd/autoscaler

FROM ubi8-minimal:8-released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/autoscaler-hpa ./cmd/autoscaler-hpa

FROM ubi8-minimal:8-released
Expand Down
2 changes: 1 addition & 1 deletion openshift/productization/dist-git/Dockerfile.controller
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/controller ./cmd/controller

FROM ubi8-minimal:8-released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/networking-certmanager ./cmd/networking/certmanager

FROM ubi8-minimal:8-released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/networking-istio ./cmd/networking/istio

FROM ubi8-minimal:8-released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/networking-nscert ./cmd/networking/nscert

FROM ubi8-minimal:8-released
Expand Down
2 changes: 1 addition & 1 deletion openshift/productization/dist-git/Dockerfile.queue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/queue ./cmd/queue

FROM ubi8-minimal:8-released
Expand Down
2 changes: 1 addition & 1 deletion openshift/productization/dist-git/Dockerfile.webhook
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/webhook ./cmd/webhook

FROM ubi8-minimal:8-released
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/$COMPONENT
COPY . .
ENV GOFLAGS="-mod=vendor"
ENV GOFLAGS="-mod=vendor -tags=disable_gcp"
RUN go build -o /tmp/$SUBCOMPONENT ./cmd/$GO_PACKAGE

FROM ubi8-minimal:8-released
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/serving/k8s_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func TestContainerValidation(t *testing.T) {
want: &apis.FieldError{
Message: "Failed to parse image reference",
Paths: []string{"image"},
Details: "image: \"foo:bar:baz\", error: could not parse reference",
Details: "image: \"foo:bar:baz\", error: could not parse reference: foo:bar:baz",
},
}, {
name: "has a lifecycle",
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func TestReconcile(t *testing.T) {
}},
WantEvents: []string{
Eventf(corev1.EventTypeWarning, "InternalError",
"failed to reconcile Configuration: Failed to parse image reference: spec.template.spec.containers[0].image\nimage: \"#\", error: could not parse reference"),
"failed to reconcile Configuration: Failed to parse image reference: spec.template.spec.containers[0].image\nimage: \"#\", error: could not parse reference: #"),
},
}, {
Name: "route creation failure",
Expand Down
Loading

0 comments on commit f73202b

Please sign in to comment.