From ac06850fe391114ff290b0a895c08ac57a6dd020 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Mon, 9 May 2022 04:00:30 +0000 Subject: [PATCH] Add a newer version of Helm for the charts base images. --- .gitlab/ci/custom.images.yml | 32 ++++++++++++++------ Dockerfile.gitlab-charts-build-base-helm-3.7 | 32 ++++++++++++++++++++ 2 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 Dockerfile.gitlab-charts-build-base-helm-3.7 diff --git a/.gitlab/ci/custom.images.yml b/.gitlab/ci/custom.images.yml index 2713522..5cf0548 100644 --- a/.gitlab/ci/custom.images.yml +++ b/.gitlab/ci/custom.images.yml @@ -19,14 +19,20 @@ alpine-helm test: extends: .test_build +# Used by charts CI +# - https://gitlab.com/gitlab-org/charts/elastic-stack/-/blob/master/.gitlab-ci.yml +# - https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/.gitlab-ci.yml +# - https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/.gitlab-ci.yml +# - https://gitlab.com/charts/charts.gitlab.io/-/blob/master/.gitlab-ci.yml +gitlab-charts-build-base-helm-3 test: + extends: .test_build +gitlab-charts-build-base-helm-3.7 test: + extends: .test_build + danger test: extends: .test_build danger-ruby-2.6.6 test: extends: .test_build -gitlab-charts-build-base test: - extends: .test_build -gitlab-charts-build-base-helm-3 test: - extends: .test_build gitlab-helm3.5-kubectl1.17 test: extends: .test_build gitlab-qa-ruby-2.7 test: @@ -107,18 +113,24 @@ alpine-helm push: extends: .build_and_deploy needs: ["alpine-helm test"] +# Used by charts CI +# - https://gitlab.com/gitlab-org/charts/elastic-stack/-/blob/master/.gitlab-ci.yml +# - https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/.gitlab-ci.yml +# - https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/.gitlab-ci.yml +# - https://gitlab.com/charts/charts.gitlab.io/-/blob/master/.gitlab-ci.yml +gitlab-charts-build-base-helm-3 push: + extends: .build_and_deploy + needs: ["gitlab-charts-build-base-helm-3 test"] +gitlab-charts-build-base-helm-3.7 push: + extends: .build_and_deploy + needs: ["gitlab-charts-build-base-helm-3.7 test"] + danger push: extends: .build_and_deploy needs: ["danger test"] danger-ruby-2.6.6 push: extends: .build_and_deploy needs: ["danger-ruby-2.6.6 test"] -gitlab-charts-build-base push: - extends: .build_and_deploy - needs: ["gitlab-charts-build-base test"] -gitlab-charts-build-base-helm-3 push: - extends: .build_and_deploy - needs: ["gitlab-charts-build-base-helm-3 test"] gitlab-helm3.5-kubectl1.17 push: extends: .build_and_deploy needs: ["gitlab-helm3.5-kubectl1.17 test"] diff --git a/Dockerfile.gitlab-charts-build-base-helm-3.7 b/Dockerfile.gitlab-charts-build-base-helm-3.7 new file mode 100644 index 0000000..2b879ba --- /dev/null +++ b/Dockerfile.gitlab-charts-build-base-helm-3.7 @@ -0,0 +1,32 @@ +FROM ruby:2.7.6-alpine +MAINTAINER GitLab Distribution Team + +ENV HELM_VERSION=3.7.2 +ENV HELM_URL=https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz +ENV HELM_HOME=/root/.helm + +# kubectl (possibly in gcloud?) +ENV KUBECTL_VERSION=1.20.15 +ENV KUBECTL_URL=https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl + +# Install dependencies +RUN apk --no-cache add -U openssl curl tar gzip bash ca-certificates git python2 py-pip groff\ + && mkdir -p /opt + +# Install kubectl +RUN curl -L -o /usr/local/bin/kubectl ${KUBECTL_URL} \ + && chmod +x /usr/local/bin/kubectl \ + && kubectl version --client + +# 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 + +# Install aws cli +RUN pip install awscli \ No newline at end of file