From d827162f2ef00e4affcc16ff3b854f082ff04ce0 Mon Sep 17 00:00:00 2001 From: Marco Wettstein Date: Wed, 29 Sep 2021 09:16:29 +0200 Subject: [PATCH 1/4] feat: new chart with new readiness/liveness/startp probes --- panter-kubernetes-base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panter-kubernetes-base.yml b/panter-kubernetes-base.yml index 76f0647..8d02452 100644 --- a/panter-kubernetes-base.yml +++ b/panter-kubernetes-base.yml @@ -21,7 +21,7 @@ variables: VALUES_DIR: "." WORKER_ENABLED: "false" # whether to create a custom worker HELM_EXPERIMENTAL_OCI: 1 - HELM_GITLAB_CHART_VERSION: "2.2.3" + HELM_GITLAB_CHART_VERSION: "2.4.1" HELM_GITLAB_CHART_PATH: catladder/helm-charts HELM_GITLAB_CHART_NAME: the-panter-chart DEFAULT_VALUE_application_replicas: -- GitLab From 352fc1d1189702b427f22a83cad2baea27876847 Mon Sep 17 00:00:00 2001 From: Marco Wettstein Date: Wed, 29 Sep 2021 09:31:56 +0200 Subject: [PATCH 2/4] feat: optimize pipeline docker file --- dockerfiles/pipeline/Dockerfile | 77 +++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 33 deletions(-) diff --git a/dockerfiles/pipeline/Dockerfile b/dockerfiles/pipeline/Dockerfile index 95d47e6..7496fa7 100644 --- a/dockerfiles/pipeline/Dockerfile +++ b/dockerfiles/pipeline/Dockerfile @@ -5,63 +5,74 @@ RUN rm /bin/sh && \ ln -s /bin/bash /bin/sh && \ mkdir -p /root/.nvm -RUN apt-get update -RUN apt-get install -y apt-transport-https ca-certificates -RUN apt-get install -y git ssh-client openssl curl bash ca-certificates git gettext-base +# add sources +# Google Chrome (for testing purposes) +RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' + +# install some sources +RUN apt-get update && apt-get install -y \ + git ssh-client \ + openssl \ + curl \ + bash \ + apt-transport-https \ + ca-certificates \ + git \ + gettext-base \ + libxss1 \ + google-chrome-stable -# # very handy for easier signal handling of SIGINT/SIGTERM/SIGKILL etc. -# RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb -# RUN dpkg -i dumb-init_*.deb -# ENTRYPOINT ["dumb-init"] -# Install Google Chrome (for testing purposes) -RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - -RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' -RUN apt-get update && apt-get install -y libxss1 google-chrome-stable # set high timeout for yarn, see https://github.com/dhis2/notes/issues/29 RUN yarn config set network-timeout 600000 -g -# add meteor (used by some apps) -RUN curl https://install.meteor.com/ | sh -# install some additional used released (should theoretically speed up ci-builds) -RUN meteor update --release 2.2 --allow-superuser -RUN yarn global add semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/changelog @semantic-release/gitlab; +# add semantic release +RUN yarn global add \ + semantic-release \ + @semantic-release/commit-analyzer \ + @semantic-release/release-notes-generator \ + @semantic-release/git \ + @semantic-release/changelog \ + @semantic-release/gitlab; +# kubernetes & helm ENV KUBERNETES_VERSION 1.18.20 RUN curl -L -o /usr/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl" ;\ chmod +x /usr/bin/kubectl ;\ kubectl version --client +# helm 2 for legacy reasons ENV HELM_2_VERSION 2.14.3 RUN curl "https://get.helm.sh/helm-v${HELM_2_VERSION}-linux-amd64.tar.gz" | tar zx ;\ mv linux-amd64/helm /usr/bin/ ;\ helm version --client RUN cp /usr/bin/helm /usr/bin/helm2 -# also install helm3 +# helm3 ENV HELM_VERSION 3.6.3 RUN curl "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" | tar zx ;\ mv linux-amd64/helm /usr/bin/helm3 ;\ helm3 version --client -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash -RUN source /root/.nvm/nvm.sh -RUN chmod +x /root/.nvm/nvm.sh -RUN /root/.nvm/nvm.sh install 10 -RUN /root/.nvm/nvm.sh install 11 -RUN /root/.nvm/nvm.sh install 12 -RUN /root/.nvm/nvm.sh install 13 -RUN /root/.nvm/nvm.sh install 14 -RUN /root/.nvm/nvm.sh install 15 -RUN /root/.nvm/nvm.sh install 16 +# install nvm && some common node versions +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash && \ + source /root/.nvm/nvm.sh && \ + chmod +x /root/.nvm/nvm.sh && \ + /root/.nvm/nvm.sh install 10 && \ + /root/.nvm/nvm.sh install 12 && \ + /root/.nvm/nvm.sh install 14 && \ + /root/.nvm/nvm.sh install 16 + +# add meteor (used by some apps) +# install also additional used released (should theoretically speed up ci-builds) +RUN curl https://install.meteor.com/ | sh && \ + meteor update --release 2.2 --allow-superuser + +# scripts RUN yarn global add ts-node typescript -# ENV NVM_DIR=/root/.nvm -# RUN bash -c 'source /root/.nvm/nvm.sh' -# RUN echo '. /root/.nvm/nvm.sh' >> /root/.bashrc -# RUN bash -c 'source /root/.nvm/nvm.sh' -# RUN echo '. ~/.nvm/nvm.sh' >> $HOME/.profile -# RUN . /root/.nvm/nvm.sh && nvm --version + RUN mkdir p /scripts COPY ./scripts/* /scripts/ RUN chmod +x /scripts/* -- GitLab From b5d6eca2c6a0bb862fb564ad5f5404fdb228e578 Mon Sep 17 00:00:00 2001 From: Marco Wettstein Date: Wed, 29 Sep 2021 09:33:09 +0200 Subject: [PATCH 3/4] feat: small optimiszation in node docker file --- dockerfiles/docker-build/scripts/ensureNodeDockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dockerfiles/docker-build/scripts/ensureNodeDockerfile b/dockerfiles/docker-build/scripts/ensureNodeDockerfile index fd7602a..c56d41a 100644 --- a/dockerfiles/docker-build/scripts/ensureNodeDockerfile +++ b/dockerfiles/docker-build/scripts/ensureNodeDockerfile @@ -39,8 +39,7 @@ WORKDIR /app $DOCKERFILE_ADDITIONS -RUN apk add --no-cache git -RUN apk add --no-cache curl +RUN apk add --no-cache git curl $YARN_INSTALL RUN chown -R node:node . USER node -- GitLab From d195906ccfb6a10c448b1d63a13a953b84be8718 Mon Sep 17 00:00:00 2001 From: Gitlab Runner Date: Wed, 29 Sep 2021 08:13:51 +0000 Subject: [PATCH 4/4] adjust PIPELINE_IMAGE_TAG --- helm-chart.yml | 2 +- monorepo.yml | 2 +- panter-kubernetes-base.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-chart.yml b/helm-chart.yml index 2f0d462..23dfdfa 100644 --- a/helm-chart.yml +++ b/helm-chart.yml @@ -11,7 +11,7 @@ image: variables: HELM_EXPERIMENTAL_OCI: 1 AUTO_RELEASE: "true" - PIPELINE_IMAGE_TAG: 6c3308bfc9d7878728334ebaa17f594bdd5f6f2d + PIPELINE_IMAGE_TAG: b5d6eca2c6a0bb862fb564ad5f5404fdb228e578 stages: - lint diff --git a/monorepo.yml b/monorepo.yml index 2be2044..562aa06 100644 --- a/monorepo.yml +++ b/monorepo.yml @@ -12,7 +12,7 @@ include: - /includes/open-mr.yml variables: - PIPELINE_IMAGE_TAG: 6c3308bfc9d7878728334ebaa17f594bdd5f6f2d + PIPELINE_IMAGE_TAG: b5d6eca2c6a0bb862fb564ad5f5404fdb228e578 image: git.panter.ch:5001/catladder/gitlab-ci/pipeline:$PIPELINE_IMAGE_TAG diff --git a/panter-kubernetes-base.yml b/panter-kubernetes-base.yml index 8d02452..7bf7409 100644 --- a/panter-kubernetes-base.yml +++ b/panter-kubernetes-base.yml @@ -12,7 +12,7 @@ include: - /includes/open-mr.yml variables: - PIPELINE_IMAGE_TAG: 6c3308bfc9d7878728334ebaa17f594bdd5f6f2d + PIPELINE_IMAGE_TAG: b5d6eca2c6a0bb862fb564ad5f5404fdb228e578 CUSTOMER_NAME: panter APP_NAME: demo COMPONENT_NAME: web -- GitLab