From 1e179457ad774448b60e3dffaec9745e5a5ab01e Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Tue, 15 Aug 2023 21:13:18 +0000 Subject: [PATCH] Bump alpine, helm, and plugin versions Signed-off-by: Brad Davidson --- Dockerfile.dapper | 10 ++++------ package/Dockerfile | 10 +++++----- scripts/build | 10 ---------- 3 files changed, 9 insertions(+), 21 deletions(-) delete mode 100755 scripts/build diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 1eec1ac..026e123 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,13 +1,11 @@ -FROM golang:1.20-alpine3.17 +# need to stick with alpine 3.17 for docker 20.10 until the s390x runners are upgraded +# ref: https://github.com/alpinelinux/docker-alpine/issues/182 +FROM alpine:3.17 ARG DAPPER_HOST_ARCH ENV ARCH $DAPPER_HOST_ARCH -RUN apk -U add bash git gcc musl-dev docker vim less file curl wget ca-certificates -RUN if [ "$(go env GOARCH)" = "amd64" ]; then \ - curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.52.2; \ - fi - +RUN apk -U add bash docker-cli git ENV DAPPER_ENV REPO TAG DRONE_TAG ENV DAPPER_SOURCE /go/src/github.com/k3s-io/klipper-helm/ ENV DAPPER_OUTPUT ./bin ./dist diff --git a/package/Dockerfile b/package/Dockerfile index 5e6c942..7566757 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -3,19 +3,19 @@ RUN apk add -U curl ca-certificates ARG ARCH RUN curl https://get.helm.sh/helm-v2.17.0-linux-${ARCH}.tar.gz | tar xvzf - --strip-components=1 -C /usr/bin RUN mv /usr/bin/helm /usr/bin/helm_v2 -RUN curl https://get.helm.sh/helm-v3.11.3-linux-${ARCH}.tar.gz | tar xvzf - --strip-components=1 -C /usr/bin +RUN curl https://get.helm.sh/helm-v3.12.3-linux-${ARCH}.tar.gz | tar xvzf - --strip-components=1 -C /usr/bin RUN mv /usr/bin/helm /usr/bin/helm_v3 COPY entry /usr/bin/ -FROM golang:1.20-alpine3.17 as plugins +FROM golang:1.20-alpine3.18 as plugins RUN apk add -U curl ca-certificates build-base binutils-gold ARG ARCH COPY --from=extract /usr/bin/helm_v3 /usr/bin/helm RUN mkdir -p /go/src/github.com/k3s-io/helm-set-status && \ - curl -sL https://github.com/k3s-io/helm-set-status/archive/refs/tags/v0.1.3.tar.gz | tar xvzf - --strip-components=1 -C /go/src/github.com/k3s-io/helm-set-status && \ + curl -sL https://github.com/k3s-io/helm-set-status/archive/refs/tags/v0.2.0.tar.gz | tar xvzf - --strip-components=1 -C /go/src/github.com/k3s-io/helm-set-status && \ make -C /go/src/github.com/k3s-io/helm-set-status install RUN mkdir -p /go/src/github.com/helm/helm-mapkubeapis && \ - curl -sL https://github.com/helm/helm-mapkubeapis/archive/refs/tags/v0.4.1.tar.gz | tar xvzf - --strip-components=1 -C /go/src/github.com/helm/helm-mapkubeapis && \ + curl -sL https://github.com/k3s-io/helm-mapkubeapis/archive/refs/tags/v0.4.1-k3s1.tar.gz | tar xvzf - --strip-components=1 -C /go/src/github.com/helm/helm-mapkubeapis && \ make -C /go/src/github.com/helm/helm-mapkubeapis && \ mkdir -p /root/.local/share/helm/plugins/helm-mapkubeapis && \ cp -vr /go/src/github.com/helm/helm-mapkubeapis/plugin.yaml \ @@ -27,7 +27,7 @@ FROM alpine:3.18 ARG BUILDDATE LABEL buildDate=$BUILDDATE RUN apk --no-cache upgrade && \ - apk add -U --no-cache ca-certificates jq bash git && \ + apk add -U --no-cache ca-certificates jq bash && \ adduser -D -u 1000 -s /bin/bash klipper-helm WORKDIR /home/klipper-helm COPY --chown=1000:1000 --from=plugins /root/.local/share/helm/plugins/ /home/klipper-helm/.local/share/helm/plugins/ diff --git a/scripts/build b/scripts/build deleted file mode 100755 index 9ab0dac..0000000 --- a/scripts/build +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e - -source $(dirname $0)/version - -cd $(dirname $0)/.. - -mkdir -p bin -[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s" -CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/klipper-helm