From 7451356aecc4583e192bd4cddbb726c53ebec363 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 2 Feb 2024 11:40:17 +0100 Subject: [PATCH 1/3] prevent staging build leaking commits to prod --- .drone.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b9060bb..f870cd0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,12 +22,16 @@ steps: image: aaronriedel/kustomize-ci commands: - cd /deployment-repo + - git clone https://git.ar21.de/yolokube/core-deployments.git . + - cd /staging-repo - git clone -b $DRONE_BRANCH https://git.ar21.de/yolokube/core-deployments.git . - - cd /deployment-repo/dashboard/overlays/staging + - cd /staging-repo/dashboard/overlays/staging - kustomize build -o /deployment-repo/dashboard/staging/dashboard.yaml volumes: - name: deployment-repo path: /deployment-repo + - name: staging-repo + path: /staging-repo when: branch: exclude: @@ -76,6 +80,8 @@ steps: volumes: - name: deployment-repo temp: {} +- name: staging-repo + temp: {} when: event: exclude: From fe857442b73ab00d64087501cd49b85d60e5df55 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 2 Feb 2024 11:41:40 +0100 Subject: [PATCH 2/3] change to test staging pipeline --- dashboard/base/dashboard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/base/dashboard.yaml b/dashboard/base/dashboard.yaml index 7d08c2a..6076d3f 100644 --- a/dashboard/base/dashboard.yaml +++ b/dashboard/base/dashboard.yaml @@ -30,7 +30,7 @@ spec: httpGet: path: / port: 8080 - initialDelaySeconds: 3 + initialDelaySeconds: 4 periodSeconds: 3 --- apiVersion: v1 From 6e75545b6c95c71bf409a241609792edd66a47b0 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 2 Feb 2024 11:46:24 +0100 Subject: [PATCH 3/3] skip CI to prevent overwriting staging builds --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f870cd0..df36210 100644 --- a/.drone.yml +++ b/.drone.yml @@ -65,7 +65,7 @@ steps: path: /deployment-repo force: false commit: true - commit_message: "KUSTOMIZE BUILD STAGING: rebuild dashboard deployment with kustomize ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)" + commit_message: "KUSTOMIZE BUILD STAGING: rebuild dashboard deployment with kustomize ${DRONE_BUILD_NUMBER} [CI SKIP]" ssh_key: from_secret: GITEA_SSH_KEY volumes: