dashboard/.drone.yml

115 lines
2.8 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:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: 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:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: yolokube/dashboard
tags:
- staging
- staging-${DRONE_BUILD_NUMBER}
when:
2023-09-22 00:24:01 +02:00
branch:
exclude:
- master
event:
- push
- 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 .
- cd /deployment-repo/dashboard/overlays/prod
2023-09-21 22:51:27 +02:00
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:${DRONE_BUILD_NUMBER}
2023-09-21 23:18:05 +02:00
- kustomize build -o /deployment-repo/dashboard/prod/dashboard.yaml
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)
image: aaronriedel/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/core-deployments.git .
- cd /deployment-repo/dashboard/overlays/staging
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:staging-${DRONE_BUILD_NUMBER}
- kustomize build -o /deployment-repo/dashboard/staging/dashboard.yaml
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:
- pull_request