From 1988ed7ed0b403a9ab1fca47346aee01f2c80409 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Wed, 7 Aug 2024 19:48:12 +0200 Subject: [PATCH] add woodpecker pipelines --- .woodpecker/.dashboard-prod.yaml | 26 ++++++++++++++++++++++++++ .woodpecker/.dashboard-staging.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .woodpecker/.dashboard-prod.yaml create mode 100644 .woodpecker/.dashboard-staging.yaml diff --git a/.woodpecker/.dashboard-prod.yaml b/.woodpecker/.dashboard-prod.yaml new file mode 100644 index 0000000..14b89fb --- /dev/null +++ b/.woodpecker/.dashboard-prod.yaml @@ -0,0 +1,26 @@ +steps: +- name: kustomize build dashboard (prod + staging) + image: git.ar21.de/aaron/kustomize-ci + commands: + - git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo + - kustomize build -o deployment-repo/dashboard/prod/dashboard.yaml dashboard/overlays/prod + - kustomize build -o deployment-repo/dashboard/staging/dashboard.yaml dashboard/overlays/staging + when: + - branch: main + event: push + path: ['dashboard/*', '.woodpecker/*'] +- name: kustomize push dashboard changes (prod + staging) + image: appleboy/drone-git-push + settings: + branch: main + remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git + path: /deployment-repo + force: false + commit: true + commit_message: "KUSTOMIZE BUILD: rebuild dashboard deployment with kustomize ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline) [CI SKIP]" + ssh_key: + from_secret: FORGEJO_SSH_KEY + when: + - branch: main + event: push + path: ['dashboard/*', '.woodpecker/*'] diff --git a/.woodpecker/.dashboard-staging.yaml b/.woodpecker/.dashboard-staging.yaml new file mode 100644 index 0000000..21f5c77 --- /dev/null +++ b/.woodpecker/.dashboard-staging.yaml @@ -0,0 +1,27 @@ +steps: +- name: kustomize build dashboard (staging) + image: git.ar21.de/aaron/kustomize-ci + commands: + - git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo + - kustomize build -o deployment-repo/dashboard/staging/dashboard.yaml dashboard/overlays/staging + when: + - branch: + exclude: main + event: push + path: ['dashboard/*', '.woodpecker/*'] +- name: kustomize push dashboard changes (staging) + image: appleboy/drone-git-push + settings: + branch: main + remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git + path: deployment-repo + force: false + commit: true + commit_message: "KUSTOMIZE BUILD STAGING: rebuild dashboard deployment with kustomize ${DRONE_BUILD_NUMBER} [CI SKIP]" + ssh_key: + from_secret: FORGEJO_SSH_KEY + when: + - branch: + exclude: main + event: push + path: ['dashboard/*', '.woodpecker/*']