core-deployments/.drone.yml

90 lines
2.6 KiB
YAML
Raw Normal View History

2024-10-07 09:19:39 +02:00
---
2023-10-11 22:57:50 +02:00
kind: pipeline
name: deploy
steps:
2024-10-07 09:19:39 +02:00
- name: kustomize build dashboard (prod + staging)
image: git.ar21.de/aaron/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/core-deployments.git .
- cd /deployment-repo/dashboard/overlays/prod
- kustomize build -o /deployment-repo/dashboard/prod/dashboard.yaml
- cd /deployment-repo/dashboard/overlays/staging
- kustomize build -o /deployment-repo/dashboard/staging/dashboard.yaml
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
2023-10-11 22:57:50 +02:00
- main
2024-10-07 09:19:39 +02:00
event:
- push
- name: kustomize build dashboard (staging)
image: git.ar21.de/aaron/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 /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:
- main
event:
- push
- 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: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
2023-10-11 22:57:50 +02:00
- main
2024-10-07 09:19:39 +02:00
event:
- push
- 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: GITEA_SSH_KEY
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
exclude:
- main
event:
- push
2023-10-11 22:57:50 +02:00
volumes:
2024-10-07 09:19:39 +02:00
- name: deployment-repo
temp: {}
- name: staging-repo
temp: {}
2023-10-11 22:57:50 +02:00
when:
event:
exclude:
2024-10-07 09:19:39 +02:00
- pull_request