-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ ARG GO_LINT_VERSION=v1.57.2 | |
ARG K8S_VERSION=v1.28.10 | ||
ARG K8S_LIBS_VERSION=v0.28.10 | ||
ARG MOCKERY_VERSION=2.42.2 | ||
ARG PROTOC_VERSION=25.3 | ||
|
||
ARG CALICO_CONTROLLER_TOOLS_VERSION=calico-0.1 | ||
|
||
|
@@ -159,6 +160,28 @@ RUN set -eux; \ | |
*) echo >&2 "warning: unsupported architecture '${TARGETARCH}'" ;; \ | ||
esac | ||
|
||
RUN set -eux; \ | ||
url=; \ | ||
case "${TARGETARCH}" in \ | ||
'amd64') \ | ||
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"; \ | ||
;; \ | ||
'arm64') \ | ||
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip"; \ | ||
;; \ | ||
'ppc64le') \ | ||
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-ppcle_64.zip"; \ | ||
;; \ | ||
's390x') \ | ||
url="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-s390_64.zip"; \ | ||
;; \ | ||
*) echo >&2 "error: unsupported architecture '${TARGETARCH}'"; exit 1 ;; \ | ||
esac; \ | ||
\ | ||
curl -sfL "$url" -o protoc.zip; \ | ||
unzip protoc.zip -d /usr/local -x readme.txt; \ | ||
rm -f protoc.zip | ||
|
||
# Install go programs that we rely on | ||
# Install ginkgo v2 as ginkgo2 and keep ginkgo v1 as ginkgo | ||
RUN go install github.com/onsi/ginkgo/v2/[email protected] && mv /go/bin/ginkgo /go/bin/ginkgo2 && \ | ||
|
@@ -170,6 +193,8 @@ RUN go install github.com/onsi/ginkgo/v2/[email protected] && mv /go/bin/ginkgo /go | |
go install github.com/wadey/[email protected] && \ | ||
go install golang.org/x/tools/cmd/[email protected] && \ | ||
go install golang.org/x/tools/cmd/[email protected] && \ | ||
go install google.golang.org/grpc/cmd/[email protected] && \ | ||
go install google.golang.org/protobuf/cmd/[email protected] && \ | ||
go install gotest.tools/[email protected] && \ | ||
go install k8s.io/code-generator/cmd/client-gen@${K8S_LIBS_VERSION} && \ | ||
go install k8s.io/code-generator/cmd/conversion-gen@${K8S_LIBS_VERSION} && \ | ||
|