Skip to content

Commit

Permalink
Add eks go1.21 in builder-base
Browse files Browse the repository at this point in the history
  • Loading branch information
zafs23 committed Aug 29, 2023
1 parent 6c0b49e commit 7940140
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions EKS_DISTRO_TAG_FILE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ al2:
eks-distro-minimal-base-golang-compiler-1.20-base: null
eks-distro-minimal-base-golang-compiler-1.20-yum: null
eks-distro-minimal-base-golang-compiler-1.20-gcc: null
eks-distro-minimal-base-golang-compiler-1.21-base: null
eks-distro-minimal-base-golang-compiler-1.21-yum: null
eks-distro-minimal-base-golang-compiler-1.21-gcc: null
eks-distro-minimal-base-nodejs-compiler-16-base: 16-2023-08-08-1691521261.2
eks-distro-minimal-base-nodejs-compiler-16-yum: 16-yum-2023-08-08-1691521261.2
eks-distro-minimal-base-nodejs-compiler-16-gcc: 16-gcc-2023-08-22-1692730868.2
Expand Down Expand Up @@ -65,6 +68,9 @@ al2023:
eks-distro-minimal-base-golang-compiler-1.20-base: null
eks-distro-minimal-base-golang-compiler-1.20-yum: null
eks-distro-minimal-base-golang-compiler-1.20-gcc: null
eks-distro-minimal-base-golang-compiler-1.21-base: null
eks-distro-minimal-base-golang-compiler-1.21-yum: null
eks-distro-minimal-base-golang-compiler-1.21-gcc: null
eks-distro-minimal-base-nodejs-compiler-16-base: 16-2023-08-24-1692903666.2023
eks-distro-minimal-base-nodejs-compiler-16-yum: 16-yum-2023-08-24-1692903666.2023
eks-distro-minimal-base-nodejs-compiler-16-gcc: 16-gcc-2023-08-24-1692903666.2023
Expand Down
33 changes: 33 additions & 0 deletions builder-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,22 @@ RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_golang.sh $GOLANG_VERSION_120 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as golang-1.21
ARG TARGETARCH
ARG GOLANG_VERSION_121
ARG GOLANG_RPM_SOURCE_DIR
WORKDIR /workdir
ENV GOPATH /go
ENV PATH="/go/bin/:$PATH"
COPY ./scripts/install_base_yum_packages.sh ./scripts/remove_yum_packages.sh ./scripts/common_vars.sh \
./scripts/install_golang.sh /
COPY $GOLANG_RPM_SOURCE_DIR/x86_64/golang*1.21*.rpm /tmp/x86_64/
COPY $GOLANG_RPM_SOURCE_DIR/aarch64/golang*1.21*.rpm /tmp/aarch64/
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_base_yum_packages.sh && \
/install_golang.sh $GOLANG_VERSION_120 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as skopeo
ARG TARGETARCH
ARG GOPROXY
Expand Down Expand Up @@ -396,6 +412,21 @@ RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=secret,id=netrc,target=/root/.netrc \
/install_go_licenses.sh

FROM ${BUILDER_IMAGE} as go-licenses-1.21
ARG TARGETARCH
ARG GOPROXY
ARG GO_LICENSES_VERSION
ENV GO_LICENSES_VERSION=$GO_LICENSES_VERSION
WORKDIR /workdir
ENV GOPATH /go
ENV PATH="/go/bin/:$PATH"
COPY --link --from=golang-1.21 /golang-1.21 /
COPY ./scripts/common_vars.sh \
./scripts/install_go_licenses.sh /
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=secret,id=netrc,target=/root/.netrc \
/install_go_licenses.sh


FROM ${BASE_IMAGE} as minimal-copy-stage

Expand Down Expand Up @@ -427,6 +458,8 @@ COPY --link --from=golang-1.19 /golang-1.19 /
COPY --link --from=go-licenses-1.19 /go-licenses-1.19 /
COPY --link --from=golang-1.20 /golang-1.20 /
COPY --link --from=go-licenses-1.20 /go-licenses-1.20 /
COPY --link --from=golang-1.21 /golang-1.21 /
COPY --link --from=go-licenses-1.21 /go-licenses-1.21 /
# add the default golang verison last so its /usr/bin/go
# takes precendent
COPY --link --from=golang-1.18 /golang-1.18 /
Expand Down
1 change: 1 addition & 0 deletions builder-base/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GOLANG_VERSION_117: 1.17.13-6
GOLANG_VERSION_118: 1.18.10-8
GOLANG_VERSION_119: 1.19.12-9
GOLANG_VERSION_120: 1.20.7-8
GOLANG_VERSION_121: 1.21.0-0
GO_LICENSES_VERSION: v1.2.1
GOVC_VERSION: 0.25.0
GOSS_VERSION: 3.1.4
Expand Down

0 comments on commit 7940140

Please sign in to comment.