This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
fail2ban-exporter-deployment/.drone.yml

53 lines
1.4 KiB
YAML
Raw Normal View History

2023-12-23 17:36:05 +01:00
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 .
2023-12-23 19:36:23 +01:00
- rm -r /deployment-repo/deploy/* || true
2023-12-23 17:36:05 +01:00
- 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]"
2023-12-23 17:36:05 +01:00
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