[ci] add rollout deployment using k9s.siempie.internal
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Simon Cornet 2024-05-03 16:15:52 +02:00
parent a619c2b675
commit b80dba5fb0

View File

@ -12,12 +12,14 @@ steps:
when: when:
branch: branch:
- 'master' - 'master'
event:
- 'push'
settings: settings:
# registery and repos # registery and repos
registry: 'cr.simoncor.net' registry: 'cr.simoncor.net'
repo: 'cr.simoncor.net/siempie/simoncor-net' repo: 'cr.simoncor.net/siempie/start-simoncor-net'
mtu: '1440' mtu: '1440'
# build stuff # build stuff
@ -32,24 +34,53 @@ steps:
# tags # tags
tags: tags:
- 'v1' - 'v1.1'
- 'latest' - 'latest'
# deploy to kubernetes # kubernetes deployment
- image: 'docker.io/bitnami/kubectl' ---
name: 'deploy' kind: 'pipeline'
pull: 'always' name: 'deployment'
settings: type: 'kubernetes'
mtu: '1440'
depends_on:
- 'build'
# disable clone
clone:
disable: true
# deployment step
steps:
# kubernetes deployment
- name: 'kubernetes deployment'
image: 'docker.io/appleboy/drone-ssh:1'
when: when:
branch: branch:
- 'master' - 'master'
event:
- 'push'
environment: settings:
KUBE_CONFIG:
from_secret: 'drone_kube_config_kaas'
commands: # bastion
- 'echo "$KUBE_CONFIG" > $HOME/.kube/config' 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:
from_secret: 'drone_user'
key:
from_secret: 'drone_ssh_key'
script:
# kubernetes deployment
- 'kubectl -n simoncor-net rollout restart deployment simoncor-net' - 'kubectl -n simoncor-net rollout restart deployment simoncor-net'