From f037b04cdf0ab5844a151ff27fd189d60a1826be Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Mon, 3 Jul 2023 11:04:07 +0200 Subject: [PATCH] [CI] Added kube deployment and use full path for composer --- .drone.yml | 16 ++++++++++++++++ Dockerfile.linux.amd64 | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index f00d4a7..e7dd38d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,3 +30,19 @@ steps: tags: - 'v1' - 'latest' + + +# deploy to kubernetes +- image: 'docker.io/bitnami/kubectl' + name: 'deploy' + pull: 'always' + settings: + mtu: '1440' + + environment: + KUBE_CONFIG: + from_secret: 'drone_kube_config' + + commands: + - 'echo "$KUBE_CONFIG" > $HOME/.kube/config' + - 'kubectl -n roundcube rollout restart statefulsets roundcube-app' diff --git a/Dockerfile.linux.amd64 b/Dockerfile.linux.amd64 index b0bf9b9..6f7b24b 100644 --- a/Dockerfile.linux.amd64 +++ b/Dockerfile.linux.amd64 @@ -6,14 +6,14 @@ RUN set -e && ln -sf bash /bin/sh RUN set -e \ && apt -y update \ && apt -y upgrade \ - && apt -y install --no-install-recommends --no-install-suggests ca-certificates git wget \ + && apt -y install --no-install-recommends --no-install-suggests ca-certificates git \ && apt -y autoremove \ && apt clean \ && rm -rf /var/lib/apt/lists/* # install plugins using composer RUN set -e \ - composer \ + /usr/bin/composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ --prefer-stable \