fix: install helm via installation script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Markus Pesch 2022-02-09 22:05:48 +01:00
parent 46a766bbfb
commit e2eb729cec
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
3 changed files with 9 additions and 42 deletions

View File

@ -2,10 +2,15 @@ FROM docker.io/library/alpine:3.14
ARG HELM_VERSION ARG HELM_VERSION
COPY install.sh /install.sh RUN apk add bash curl git openssl && \
RUN VERSION=${HELM_VERSION} /install.sh curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 --output /tmp/install.sh
RUN [[ ${HELM_VERSION} == "" ]]; bash /tmp/install.sh
RUN [[ ${HELM_VERSION} != "" ]]; bash /tmp/install.sh --version ${HELM_VERSION}
RUN rm /tmp/install.sh
# Install additionally cm-push plugin # Install additionally cm-push plugin
RUN helm plugin install https://github.com/chartmuseum/helm-push.git RUN helm plugin install https://github.com/chartmuseum/helm-push.git
ENTRYPOINT [ "/usr/bin/helm" ] ENTRYPOINT [ "/usr/local/bin/helm" ]

View File

@ -49,4 +49,4 @@ container-image/push:
# ============================================================================== # ==============================================================================
# Declare the contents of the PHONY variable as phony. We keep that information # Declare the contents of the PHONY variable as phony. We keep that information
# in a variable so we can use it in if_changed. # in a variable so we can use it in if_changed.
.PHONY: ${PHONY} .PHONY: ${PHONY}

View File

@ -1,38 +0,0 @@
#!/bin/sh
set -xe
BASE_URL=https://get.helm.sh
if [ -z ${VERSION+x} ]; then
echo ${VERSION} not defined
exit 1
fi
case `uname -m` in
x86_64)
ARCH=amd64
;;
armv7l)
ARCH=arm
;;
aarch64)
ARCH=arm64
;;
ppc64le)
ARCH=ppc64le
;;
s390x)
ARCH=s390x
;;
*)
echo "un-supported arch, exit ..."
exit 1
;;
esac
apk add --update --no-cache wget git
wget ${BASE_URL}/helm-${VERSION}-linux-${ARCH}.tar.gz -O - | tar -xz
mv linux-${ARCH}/helm /usr/bin/helm
chmod +x /usr/bin/helm
rm -rf linux-${ARCH}