dashboard/.drone.yml

75 lines
1.7 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: bump tag in deployment-repo
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 22:57:20 +02:00
- cd /deployment-repo/dashboard
2023-09-21 22:51:27 +02:00
- kustomize edit set image yolokube/dashboard=yolokube/dashboard:${DRONE_BUILD_NUMBER}
- kustomize build -o /deployment-repo/dashboard/dashboard.yaml
volumes:
- name: deployment-repo
path: /deployment-repo
when:
branch:
- master
event:
- push
- name: push new tag to deployment-repo
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: docker-build
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: yolokube/dashboard
2023-09-21 21:18:53 +02:00
tags: latest
2023-09-20 21:57:34 +02:00
dry_run: true
when:
branch:
2023-09-21 22:51:27 +02:00
exclude:
- master
2023-09-20 21:57:34 +02:00
event:
2023-09-21 22:51:27 +02:00
exclude:
- push
volumes:
- name: deployment-repo
temp: {}