2022-11-01 13:03:03 +01:00
|
|
|
---
|
|
|
|
kind: 'pipeline'
|
|
|
|
name: 'build'
|
2023-03-22 17:22:48 +01:00
|
|
|
type: 'kubernetes'
|
2022-11-01 13:03:03 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2023-03-28 14:47:33 +02:00
|
|
|
# build and publish
|
2023-03-28 14:55:45 +02:00
|
|
|
- image: 'docker.io/plugins/docker'
|
2023-03-28 14:47:33 +02:00
|
|
|
name: 'publish'
|
|
|
|
pull: 'always'
|
2023-12-29 19:51:28 +01:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- 'master'
|
|
|
|
event:
|
|
|
|
- 'push'
|
|
|
|
|
2023-03-28 14:47:33 +02:00
|
|
|
settings:
|
|
|
|
|
|
|
|
# registery and repos
|
2023-05-24 18:08:19 +02:00
|
|
|
registry: 'cr.simoncor.net'
|
|
|
|
repo: 'cr.simoncor.net/siempie/start-simoncor-net'
|
2023-03-28 15:47:49 +02:00
|
|
|
mtu: '1440'
|
2023-03-28 14:47:33 +02:00
|
|
|
|
|
|
|
# build stuff
|
|
|
|
dockerfile: 'Dockerfile.linux.amd64'
|
|
|
|
daemon_off: 'false'
|
|
|
|
|
|
|
|
# authentication
|
|
|
|
username:
|
|
|
|
from_secret: 'docker_username'
|
|
|
|
password:
|
|
|
|
from_secret: 'docker_password'
|
|
|
|
|
|
|
|
# tags
|
|
|
|
tags:
|
|
|
|
- 'v1.1'
|
|
|
|
- 'latest'
|
|
|
|
|
|
|
|
|
2023-03-23 10:44:10 +01:00
|
|
|
# deploy to kubernetes
|
2023-03-23 11:44:32 +01:00
|
|
|
- image: 'docker.io/bitnami/kubectl'
|
2023-03-23 10:44:10 +01:00
|
|
|
name: 'deploy'
|
|
|
|
pull: 'always'
|
2023-03-23 11:57:26 +01:00
|
|
|
settings:
|
2023-03-28 15:47:49 +02:00
|
|
|
mtu: '1440'
|
2023-12-29 19:51:28 +01:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- 'master'
|
|
|
|
event:
|
|
|
|
- 'push'
|
2023-03-23 11:57:26 +01:00
|
|
|
|
2023-03-23 11:52:22 +01:00
|
|
|
environment:
|
|
|
|
KUBE_CONFIG:
|
|
|
|
from_secret: 'drone_kube_config'
|
2023-03-23 11:28:25 +01:00
|
|
|
|
2023-03-23 10:44:10 +01:00
|
|
|
commands:
|
2023-03-23 11:55:14 +01:00
|
|
|
- 'echo "$KUBE_CONFIG" > $HOME/.kube/config'
|
2023-03-23 11:51:53 +01:00
|
|
|
- 'kubectl -n start-simoncor-net rollout restart deployment start-simoncor-net'
|