From 25fc7b4122fce934281617778bc841317451a4e2 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Tue, 27 Aug 2024 01:12:00 +0200 Subject: [PATCH] chore(ci): move to woodpecker --- .drone.yml | 53 ---------------------------------------- .woodpecker/.deploy.yaml | 25 +++++++++++++++++++ README.md | 4 +-- kustomization.yaml | 2 +- 4 files changed, 28 insertions(+), 56 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker/.deploy.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index a5baf36..0000000 --- a/.drone.yml +++ /dev/null @@ -1,53 +0,0 @@ -kind: pipeline -name: deploy -steps: -- name: kustomize build - image: git.ar21.de/aaron/kustomize-ci - commands: - - cd /source-repo - - git clone https://git.ar21.de/yolokube/fail2ban-prometheus-exporter.git . - - cd /deployment-repo - - git clone https://git.ar21.de/yolokube/fail2ban-exporter-deployment.git . - - rm -r /deployment-repo/deploy/* || true - - cp -rv /source-repo/deploy /deployment-repo/base - - mkdir -p /deployment-repo/deploy - - kustomize build -o /deployment-repo/deploy/fail2ban-exporter.yaml - - rm -r /deployment-repo/base - volumes: - - name: deployment-repo - path: /deployment-repo - - name: source-repo - path: /source-repo - when: - branch: - - main - event: - - push -- name: kustomize push changes - image: appleboy/drone-git-push - settings: - branch: main - remote: ssh://git@git.ar21.de:2222/yolokube/fail2ban-exporter-deployment.git - path: /deployment-repo - force: false - commit: true - commit_message: "KUSTOMIZE BUILD: build fail2ban-exporter deployment with kustomize ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline) [CI SKIP]" - ssh_key: - from_secret: GITEA_SSH_KEY - volumes: - - name: deployment-repo - path: /deployment-repo - when: - branch: - - main - event: - - push -volumes: -- name: deployment-repo - temp: {} -- name: source-repo - temp: {} -when: - event: - exclude: - - pull_request \ No newline at end of file diff --git a/.woodpecker/.deploy.yaml b/.woodpecker/.deploy.yaml new file mode 100644 index 0000000..e4541ba --- /dev/null +++ b/.woodpecker/.deploy.yaml @@ -0,0 +1,25 @@ +steps: +- name: kustomize build + image: git.ar21.de/aaron/kustomize-ci + commands: + - mv deploy base + - mkdir -p deploy + - kustomize build -o deploy/fail2ban-exporter.yaml + - rm -r base + when: + - branch: main + event: push +- name: kustomize push changes + image: appleboy/drone-git-push + settings: + branch: main + remote: ssh://git@git.ar21.de:2222/yolokube/fail2ban-exporter-deployment.git + path: . + force: false + commit: true + commit_message: "KUSTOMIZE BUILD: build fail2ban-exporter deployment with kustomize ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline) [CI SKIP]" + ssh_key: + from_secret: FORGEJO_SSH_KEY + when: + - branch: main + event: push diff --git a/README.md b/README.md index 115d934..8b5ba2e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -[![Build Status](https://drone.ar21.de/api/badges/yolokube/fail2ban-exporter-deployment/status.svg)](https://drone.ar21.de/yolokube/fail2ban-exporter-deployment) +[![Build Status](https://woodpecker.ar21.de/api/badges/6/status.svg)](https://woodpecker.ar21.de/repos/6) -# Do not edit anything in the "deploy" folder manually \ No newline at end of file +# Do not edit anything in the "deploy" folder manually diff --git a/kustomization.yaml b/kustomization.yaml index b53977b..7df4676 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -1,5 +1,5 @@ resources: -- ./base +- ./base/fail2ban-exporter.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: