From 212a056a56513cf10cd8eb363f8a9d04734de4d6 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Sat, 23 Dec 2023 17:36:05 +0100 Subject: [PATCH] initial commit --- .drone.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 +++ kustomization.yaml | 12 +++++++++++ 3 files changed, 67 insertions(+) create mode 100644 .drone.yml create mode 100644 README.md create mode 100644 kustomization.yaml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..2966948 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,52 @@ +kind: pipeline +name: deploy +steps: +- name: kustomize build + image: aaronriedel/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 . + - 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)" + 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/README.md b/README.md new file mode 100644 index 0000000..115d934 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +[![Build Status](https://drone.ar21.de/api/badges/yolokube/fail2ban-exporter-deployment/status.svg)](https://drone.ar21.de/yolokube/fail2ban-exporter-deployment) + +# Do not edit anything in the "deploy" folder manually \ No newline at end of file diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..9b20a5d --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,12 @@ +resources: +- ./base +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: yolokube/fail2ban-prometheus-exporter + newName: yolokube/fail2ban-prometheus-exporter + newTag: "latest" +- name: yolokube/country-geo-locations + newName: yolokube/country-geo-locations + newTag: "latest" +namespace: fail2ban-prometheus \ No newline at end of file