Skip to content

Commit 770234e

Browse files
committed
Add more GO env vars
1 parent 2586f7e commit 770234e

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

images/build/cross/default/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ ENV KUBE_CROSSPLATFORMS \
4545
COPY --from=go-source /usr/local/go /usr/local/go
4646
ENV PATH=/usr/local/go/bin:$PATH
4747
ENV GOROOT=/usr/local/go
48+
ENV GOLANG_VERSION=${GO_VERSION}
49+
ENV GOTOOLCHAIN=local
50+
ENV GOPATH=/usr/local/go
51+
4852
# Pre-compile the standard go library when cross-compiling. This is much easier now when we have go1.5+
4953
RUN targetArch=$(echo $TARGETPLATFORM | cut -f2 -d '/') \
5054
&& if [ ${targetArch} = "amd64" ]; then \

images/build/go-runner/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ COPY --from=go-source /usr/local/go /usr/local/go
2929
# Set up Go environment
3030
ENV PATH=/usr/local/go/bin:$PATH
3131
ENV GOROOT=/usr/local/go
32+
ENV GOLANG_VERSION=${GO_VERSION}
33+
ENV GOTOOLCHAIN=local
34+
ENV GOPATH=/usr/local/go
3235

3336
# Copy the sources
3437
COPY ./go-runner.go ./

images/releng/ci/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ COPY --from=go-source /usr/local/go /usr/local/go
2626
# Set up Go environment
2727
ENV PATH=/usr/local/go/bin:$PATH
2828
ENV GOROOT=/usr/local/go
29+
ENV GOLANG_VERSION=${GO_VERSION}
30+
ENV GOTOOLCHAIN=local
31+
ENV GOPATH=/usr/local/go
2932

3033
# Install required packages for adding Google Cloud SDK repository
3134
RUN apt-get update && \

images/releng/k8s-ci-builder/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ COPY --from=go-source /usr/local/go /go
2929
# Set up Go environment
3030
ENV PATH=/go/bin:$PATH
3131
ENV GOROOT=/go
32+
ENV GOLANG_VERSION=${GO_VERSION_TOOLING}
33+
ENV GOTOOLCHAIN=local
34+
ENV GOPATH=/go
3235

3336
WORKDIR /go/src/k8s.io/release
3437

0 commit comments

Comments
 (0)