From cc121a93fb81c55008034ea6119ac13a44092dd7 Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Mon, 22 Mar 2021 15:26:14 +0000 Subject: [PATCH] Add kubectl 1.17/Helm 3.5.2-based image Signed-off-by: Takuya Noguchi --- .gitlab-ci.yml | 4 ++-- Dockerfile.gitlab-helm3.5-kubectl1.17 | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 Dockerfile.gitlab-helm3.5-kubectl1.17 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a3dd8c..919da66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -114,7 +114,7 @@ danger test: *test_build alpine-helm test: *test_build gitlab-charts-build-base test: *test_build gitlab-charts-build-base-helm-3 test: *test_build -gitlab-helm3-kubectl1.14 test: *test_build +gitlab-helm3.5-kubectl1.17 test: *test_build gitlab-qa-ruby-2.7 test: *test_build gitlab-qa-ruby-3.0 test: *test_build gitlab-qa-alpine-ruby-2.7 test: *test_build @@ -187,7 +187,7 @@ danger push: *build_and_deploy alpine-helm push: *build_and_deploy gitlab-charts-build-base push: *build_and_deploy gitlab-charts-build-base-helm-3 push: *build_and_deploy -gitlab-helm3-kubectl1.14 push: *build_and_deploy +gitlab-helm3.5-kubectl1.17 push: *build_and_deploy gitlab-qa-ruby-2.7 push: *build_and_deploy gitlab-qa-ruby-3.0 push: *build_and_deploy gitlab-qa-alpine-ruby-2.7 push: *build_and_deploy diff --git a/Dockerfile.gitlab-helm3.5-kubectl1.17 b/Dockerfile.gitlab-helm3.5-kubectl1.17 new file mode 100644 index 0000000..1ef2539 --- /dev/null +++ b/Dockerfile.gitlab-helm3.5-kubectl1.17 @@ -0,0 +1,27 @@ +FROM ruby:3.0.0-alpine +MAINTAINER GitLab Engineering Productivity Team + +ENV KUBECTL_VERSION=1.17.17 + +ENV HELM_VERSION=3.5.3 +ENV HELM_URL=https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz +ENV HELM_HOME=/root/.helm + +# Install dependencies +RUN apk --no-cache -U add openssl curl tar gzip bash ca-certificates git \ + && mkdir -p /opt + +# Install kubectl +RUN wget https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ + && install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \ + && rm -f kubectl + +# Install Helm +RUN wget -q -O - ${HELM_URL} | tar zxf - \ + && mv linux-amd64/helm /usr/bin/ \ + && chmod +x /usr/bin/helm \ + && helm version --client + +# Install kubeval +RUN mkdir -p $HELM_HOME/plugins \ + && helm plugin install https://github.com/instrumenta/helm-kubeval