dashboard/.drone.yml
Aaron Riedel 7c39446aca
All checks were successful
continuous-integration/drone/push Build is passing
fix pipeline 1
2023-09-21 22:57:20 +02:00

74 lines
1.7 KiB
YAML

kind: pipeline
name: deploy
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo: yolokube/dashboard
tags:
- latest
- ${DRONE_BUILD_NUMBER}
when:
branch:
- master
event:
- push
- name: bump tag in deployment-repo
image: aaronriedel/kustomize-ci
commands:
- cd /deployment-repo
- git clone https://git.ar21.de/yolokube/core-deployments.git .
- cd /deployment-repo/dashboard
- 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
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
tags: latest
dry_run: true
when:
branch:
exclude:
- master
event:
exclude:
- push
volumes:
- name: deployment-repo
temp: {}