Skip to content

Commit

Permalink
bump go to 1.20 (#3768)
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Mar 20, 2023
1 parent 5d06f77 commit 1305d23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
19 changes: 13 additions & 6 deletions images/prow-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,15 @@ RUN curl -fsSL "https://github.com/protocolbuffers/protobuf/releases/download/v$
# protoc-gen-gogofaster is installed below

############################################################
FROM golang:1.20.2 AS external-go-gets
FROM golang:1.19.7 AS external-go-previous
# Capture the version that depndabot bumps so that we can install it into the base image
RUN go version | cut -d' ' -f3 > /golang_version.latest
RUN go version | cut -d' ' -f3 > /golang.version

FROM golang:1.20.2 AS external-go-latest
# Capture the version that depndabot bumps so that we can install it into the base image
RUN go version | cut -d' ' -f3 > /golang.version

FROM external-go-latest AS external-go-gets

ARG KUBETEST2_VERSION=d306c412d528f0a5dda4b6bd1c7550a905f5edb9
ARG KUBETEST2_KOPS_VERSION=9b957a1d6189ee612506c9b6dc5b8b1a19e9c2aa # v1.25.0 release
Expand Down Expand Up @@ -226,7 +232,8 @@ FROM base

COPY --from=external-rust-gets /usr/local/cargo/bin/rcodesign /usr/local/bin/rcodesign
COPY --from=external-go-gets /go/bin/* /go/bin/
COPY --from=external-go-gets /golang_version.latest /golang_version.latest
COPY --from=external-go-latest /golang.version /golang-latest.version
COPY --from=external-go-previous /golang.version /golang-previous.version

# Install go using https://github.com/moovweb/gvm
# GVM_NO_UPDATE_PROFILE=true means do not alter /root/.bashrc to automatically source gvm config, so when not using runner.sh, image works normally
Expand All @@ -238,10 +245,10 @@ RUN curl -fsSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/g
COPY images/prow-tests/source-gvm-and-run.sh /usr/local/bin
# Install our version of Go.

RUN source-gvm-and-run.sh install `cat /golang_version.latest` --prefer-binary
RUN source-gvm-and-run.sh install `cat /golang-previous.version` --prefer-binary
# The below will need to be updated to whatever the latest is when the project is ready.
RUN source-gvm-and-run.sh install go1.19.6 --prefer-binary
RUN source-gvm-and-run.sh use go1.19.6 --default
RUN source-gvm-and-run.sh install `cat /golang-latest.version` --prefer-binary
RUN source-gvm-and-run.sh use `cat /golang-latest.version` --default

# Note, it's pointless to run `source-gvm-and-run.sh use goX.XX` in this Dockerfile because the PATH changes it makes won't stay in effect
# We wrap the runner with our own which will run `gvm use $GO_VERSION` for us.
Expand Down
3 changes: 1 addition & 2 deletions images/tool/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.17
LABEL maintainer="Chao Dai <chaodai@google.com>"
FROM golang:1.20.2

# Required input: -e TOOL_NAME=name, i.e. TOOL_NAME=flaky-test-reporter
ARG TOOL_NAME
Expand Down

0 comments on commit 1305d23

Please sign in to comment.