simoncor.net/.drone.yaml
Simon Cornet a619c2b675
Some checks failed
continuous-integration/drone/push Build is failing
[ci] deploy to kaas cluster
2024-05-03 15:56:57 +02:00

56 lines
952 B
YAML

---
kind: 'pipeline'
name: 'build'
type: 'kubernetes'
steps:
# build and publish
- image: 'docker.io/plugins/docker'
name: 'publish'
pull: 'always'
when:
branch:
- 'master'
settings:
# registery and repos
registry: 'cr.simoncor.net'
repo: 'cr.simoncor.net/siempie/simoncor-net'
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'
# deploy to kubernetes
- image: 'docker.io/bitnami/kubectl'
name: 'deploy'
pull: 'always'
settings:
mtu: '1440'
when:
branch:
- 'master'
environment:
KUBE_CONFIG:
from_secret: 'drone_kube_config_kaas'
commands:
- 'echo "$KUBE_CONFIG" > $HOME/.kube/config'
- 'kubectl -n simoncor-net rollout restart deployment simoncor-net'