dashboard/.drone.yml
Aaron Riedel c27aac434c
All checks were successful
continuous-integration/drone/push Build is passing
remove duplicate
2024-01-29 20:24:55 +01:00

136 lines
3.3 KiB
YAML

kind: pipeline
name: deploy
steps:
- name: docker
image: plugins/docker
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/dashboard
tags:
- latest
- ${DRONE_BUILD_NUMBER}
when:
branch:
- master
event:
- push
- name: docker-staging
image: plugins/docker
settings:
registry: git.ar21.de
username:
from_secret: REGISTRY_USER
password:
from_secret: REGISTRY_PASS
repo: git.ar21.de/yolokube/dashboard
tags:
- staging
- staging-${DRONE_BUILD_NUMBER}
when:
branch:
exclude:
- master
event:
- push
- 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)
image: aaronriedel/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/core-deployments.git .
- cd /deployment-repo/dashboard/overlays/prod
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${DRONE_BUILD_NUMBER}
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 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:
- push
- name: push new tag to deployment-repo (prod)
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
when:
branch:
- master
event:
- push
- name: push new tag to deployment-repo (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: "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
when:
branch:
exclude:
- master
event:
- push
volumes:
- name: deployment-repo
temp: {}
when:
event:
exclude:
- pull_request