2023-09-20 21:57:34 +02:00
|
|
|
kind: pipeline
|
|
|
|
name: deploy
|
|
|
|
steps:
|
2023-09-20 22:05:52 +02:00
|
|
|
- name: docker
|
2023-09-20 21:57:34 +02:00
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2023-12-24 18:07:19 +01:00
|
|
|
registry: git.ar21.de
|
2023-09-20 21:57:34 +02:00
|
|
|
username:
|
2023-12-24 18:07:19 +01:00
|
|
|
from_secret: REGISTRY_USER
|
2023-09-20 21:57:34 +02:00
|
|
|
password:
|
2023-12-24 18:07:19 +01:00
|
|
|
from_secret: REGISTRY_PASS
|
|
|
|
repo: git.ar21.de/yolokube/dashboard
|
2023-09-21 22:51:27 +02:00
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_BUILD_NUMBER}
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
2023-09-21 23:52:07 +02:00
|
|
|
- name: docker-staging
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2023-12-24 18:07:19 +01:00
|
|
|
registry: git.ar21.de
|
2023-09-21 23:52:07 +02:00
|
|
|
username:
|
2023-12-24 18:07:19 +01:00
|
|
|
from_secret: REGISTRY_USER
|
2023-09-21 23:52:07 +02:00
|
|
|
password:
|
2023-12-24 18:07:19 +01:00
|
|
|
from_secret: REGISTRY_PASS
|
|
|
|
repo: git.ar21.de/yolokube/dashboard
|
2023-09-21 23:52:07 +02:00
|
|
|
tags:
|
|
|
|
- staging
|
|
|
|
- staging-${DRONE_BUILD_NUMBER}
|
|
|
|
when:
|
2023-09-22 00:24:01 +02:00
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
2023-09-21 23:52:07 +02:00
|
|
|
- name: bump tag in deployment-repo (prod)
|
2023-09-21 22:51:27 +02:00
|
|
|
image: aaronriedel/kustomize-ci
|
|
|
|
commands:
|
2023-09-21 22:57:20 +02:00
|
|
|
- cd /deployment-repo
|
2023-09-21 22:51:27 +02:00
|
|
|
- git clone https://git.ar21.de/yolokube/core-deployments.git .
|
2023-09-21 23:52:07 +02:00
|
|
|
- cd /deployment-repo/dashboard/overlays/prod
|
2023-12-24 18:07:19 +01:00
|
|
|
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${DRONE_BUILD_NUMBER}
|
2023-09-21 22:51:27 +02:00
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
2023-09-21 23:52:07 +02:00
|
|
|
- name: bump tag in deployment-repo (staging)
|
|
|
|
image: aaronriedel/kustomize-ci
|
|
|
|
commands:
|
|
|
|
- cd /deployment-repo
|
|
|
|
- git clone https://git.ar21.de/yolokube/core-deployments.git .
|
|
|
|
- cd /deployment-repo/dashboard/overlays/staging
|
2023-12-24 18:07:19 +01:00
|
|
|
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:staging-${DRONE_BUILD_NUMBER}
|
2023-09-21 23:52:07 +02:00
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
|
|
|
event:
|
2023-09-22 00:24:01 +02:00
|
|
|
- push
|
2023-09-21 23:52:07 +02:00
|
|
|
- name: push new tag to deployment-repo (prod)
|
2023-09-21 22:51:27 +02:00
|
|
|
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: "DASHBOARD: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
|
|
|
|
ssh_key:
|
|
|
|
from_secret: GITEA_SSH_KEY
|
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
2023-09-20 21:57:34 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
2023-09-21 23:52:07 +02:00
|
|
|
- name: push new tag to deployment-repo (staging)
|
|
|
|
image: appleboy/drone-git-push
|
2023-09-20 21:57:34 +02:00
|
|
|
settings:
|
2023-09-21 23:52:07 +02:00
|
|
|
branch: main
|
|
|
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
|
|
|
path: /deployment-repo
|
|
|
|
force: false
|
|
|
|
commit: true
|
|
|
|
commit_message: "DASHBOARD STAGING: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
|
|
|
|
ssh_key:
|
|
|
|
from_secret: GITEA_SSH_KEY
|
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
path: /deployment-repo
|
2023-09-20 21:57:34 +02:00
|
|
|
when:
|
2023-09-21 23:52:07 +02:00
|
|
|
branch:
|
|
|
|
exclude:
|
|
|
|
- master
|
|
|
|
event:
|
2023-09-22 00:24:01 +02:00
|
|
|
- push
|
2023-09-21 22:51:27 +02:00
|
|
|
volumes:
|
|
|
|
- name: deployment-repo
|
|
|
|
temp: {}
|
2023-09-22 00:24:01 +02:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
exclude:
|
2023-12-24 18:07:19 +01:00
|
|
|
- pull_request
|