2022-04-22 10:44:10 +02:00
|
|
|
---
|
|
|
|
kind: 'pipeline'
|
2023-05-24 10:21:58 +02:00
|
|
|
name: 'build'
|
|
|
|
type: 'kubernetes'
|
2022-04-22 10:44:10 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2023-05-24 10:21:58 +02:00
|
|
|
# build and publish
|
|
|
|
- image: 'docker.io/plugins/docker'
|
|
|
|
name: 'publish'
|
|
|
|
pull: 'always'
|
2023-12-29 19:51:15 +01:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- 'master'
|
|
|
|
|
2023-05-24 10:21:58 +02:00
|
|
|
settings:
|
|
|
|
|
|
|
|
# registery and repos
|
2023-05-24 18:08:08 +02:00
|
|
|
registry: 'cr.simoncor.net'
|
|
|
|
repo: 'cr.simoncor.net/siempie/simoncor-net'
|
2023-05-24 10:21:58 +02:00
|
|
|
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'
|
2023-05-24 11:29:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
# deploy to kubernetes
|
|
|
|
- image: 'docker.io/bitnami/kubectl'
|
|
|
|
name: 'deploy'
|
|
|
|
pull: 'always'
|
|
|
|
settings:
|
|
|
|
mtu: '1440'
|
2023-12-29 19:51:15 +01:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- 'master'
|
2023-05-24 11:29:43 +02:00
|
|
|
|
|
|
|
environment:
|
|
|
|
KUBE_CONFIG:
|
2024-05-03 15:56:57 +02:00
|
|
|
from_secret: 'drone_kube_config_kaas'
|
2023-05-24 11:29:43 +02:00
|
|
|
|
|
|
|
commands:
|
|
|
|
- 'echo "$KUBE_CONFIG" > $HOME/.kube/config'
|
|
|
|
- 'kubectl -n simoncor-net rollout restart deployment simoncor-net'
|