From b1723542f953d74911613ba931e2530ce6c97f1b Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Tue, 13 Feb 2024 21:15:39 -0800 Subject: [PATCH 1/2] Update gomplate to 3.11.7 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dac8127..61011be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ ############ FROM alpine:3 AS gomplate ARG TARGETPLATFORM=linux/amd64 -ARG GOMPLATE_VERSION=3.10.0 -ARG GOMPLATE_AMD64_SHA256=603539aac4e09f98a8ca5b6e5da0c21213221206dc7175a5644255c7a22b936d -ARG GOMPLATE_ARM64_SHA256=3352ef521977ee39cdd406a9a7943d0b5f29772e5542995416bf093b90bbae2c +ARG GOMPLATE_VERSION=3.11.7 +ARG GOMPLATE_AMD64_SHA256=8010a1a4ff15db238f61f02cd716d677aff9a4c7b59335008183f897f46ca9a5 +ARG GOMPLATE_ARM64_SHA256=57ebc2ca8c231a24d5664145f9e731c61a260328ca3a6118fca8b94c37075cd8 RUN apk add --no-cache curl bash SHELL ["/bin/bash", "-c"] RUN ARCH=${TARGETPLATFORM/linux\//} \ From 15f89d09cfbbb9826fcf56e535f568cb7ea0de02 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Tue, 13 Feb 2024 21:18:21 -0800 Subject: [PATCH 2/2] Fix linux/arm64 image We were installing amd64 gomplate into the arm64 image. --- .github/workflows/ci.yaml | 2 +- Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 94f2031..a4c9b97 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run tests - run: docker build --target test . + run: docker build --build-arg TARGETPLATFORM=linux/amd64 --target test . build: name: Build runs-on: [self-hosted, linux] diff --git a/Dockerfile b/Dockerfile index 61011be..539367a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,14 @@ # Gomplate ############ FROM alpine:3 AS gomplate -ARG TARGETPLATFORM=linux/amd64 +ARG TARGETPLATFORM ARG GOMPLATE_VERSION=3.11.7 ARG GOMPLATE_AMD64_SHA256=8010a1a4ff15db238f61f02cd716d677aff9a4c7b59335008183f897f46ca9a5 ARG GOMPLATE_ARM64_SHA256=57ebc2ca8c231a24d5664145f9e731c61a260328ca3a6118fca8b94c37075cd8 RUN apk add --no-cache curl bash SHELL ["/bin/bash", "-c"] -RUN ARCH=${TARGETPLATFORM/linux\//} \ +RUN echo "Downloading gomplate version ${GOMPLATE_VERSION} for ${TARGETPLATFORM}" \ + && ARCH=${TARGETPLATFORM/linux\//} \ && curl -Lf https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-${ARCH}-slim -o /tmp/gomplate \ && sha_envvar="GOMPLATE_${ARCH^^}_SHA256" \ && GOMPLATE_SHA256="${!sha_envvar}" \