---
kind: 'pipeline'
name: 'build'
type: 'kubernetes'
steps:
# build and publish
- image: 'docker.io/plugins/docker'
name: 'publish'
pull: 'always'
when:
branch:
- 'main'
event:
- 'push'
settings:
# registery and repos
registry: 'cr.simoncor.net'
repo: 'cr.simoncor.net/siempie/roundcube'
mtu: '1440'
# build stuff
dockerfile: 'Dockerfile.linux.amd64'
daemon_off: 'false'
# authentication
username:
from_secret: 'docker_username'
password:
from_secret: 'docker_password'
# tags
tags:
- 'v1'
- 'latest'
# kubernetes deployment
name: 'deployment'
depends_on:
- 'build'
# disable clone
clone:
disable: true
# deployment step
- name: 'kubernetes deployment'
image: 'docker.io/appleboy/drone-ssh:1'
- 'master'
# bastion
proxy_host: 'siempie.com'
proxy_port: '22'
proxy_user:
from_secret: 'drone_user'
proxy_key:
from_secret: 'drone_ssh_key'
# k9s
host: 'k9s.siempie.internal'
port: '22'
user:
key:
script:
- 'kubectl -n roundcube rollout restart statefulsets roundcube-app'