dashboard/.drone.yml

137 lines
3.3 KiB
YAML
Raw Normal View History

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
- name: docker-staging
image: plugins/docker
settings:
2023-12-24 18:07:19 +01:00
registry: git.ar21.de
username:
2023-12-24 18:07:19 +01:00
from_secret: REGISTRY_USER
password:
2023-12-24 18:07:19 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/dashboard
tags:
- staging
- staging-${DRONE_BUILD_NUMBER}
when:
2023-09-22 00:24:01 +02:00
branch:
exclude:
- master
event:
- push
2024-01-29 20:23:48 +01:00
- name: test (prod)
image: git.ar21.de/yolokube/dashboard:${DRONE_BUILD_NUMBER}
commands:
- nginx
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
when:
branch:
- master
event:
- push
- name: test (staging)
image: git.ar21.de/yolokube/dashboard:staging-${DRONE_BUILD_NUMBER}
commands:
- nginx
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
when:
branch:
exclude:
- master
event:
- push
- name: bump tag in deployment-repo (prod)
2024-05-24 09:57:27 +02:00
image: git.ar21.de/aaron/kustomize-ci
2023-09-21 22:51:27 +02:00
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 .
- 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
- name: bump tag in deployment-repo (staging)
2024-05-24 09:57:27 +02:00
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/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}
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
exclude:
- master
event:
2023-09-22 00:24:01 +02:00
- push
- 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
- name: push new tag to deployment-repo (staging)
image: appleboy/drone-git-push
2023-09-20 21:57:34 +02:00
settings:
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:
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