Simon Cornet
b6fff335f2
All checks were successful
continuous-integration/drone/push Build is passing
87 lines
1.4 KiB
YAML
87 lines
1.4 KiB
YAML
---
|
|
kind: 'pipeline'
|
|
name: 'build'
|
|
type: 'kubernetes'
|
|
|
|
steps:
|
|
|
|
# build and publish
|
|
- image: 'docker.io/plugins/docker'
|
|
name: 'publish'
|
|
pull: 'always'
|
|
when:
|
|
branch:
|
|
- 'master'
|
|
event:
|
|
- 'push'
|
|
|
|
settings:
|
|
|
|
# registery and repos
|
|
registry: 'cr.simoncor.net'
|
|
repo: 'cr.simoncor.net/siempie/start-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.1'
|
|
- 'latest'
|
|
|
|
|
|
# kubernetes deployment
|
|
---
|
|
kind: 'pipeline'
|
|
name: 'deployment'
|
|
type: 'kubernetes'
|
|
|
|
depends_on:
|
|
- 'build'
|
|
|
|
# disable clone
|
|
clone:
|
|
disable: true
|
|
|
|
# deployment step
|
|
steps:
|
|
|
|
# kubernetes deployment
|
|
- name: 'kubernetes deployment'
|
|
image: 'docker.io/appleboy/drone-ssh:1'
|
|
when:
|
|
branch:
|
|
- 'master'
|
|
event:
|
|
- 'push'
|
|
|
|
settings:
|
|
|
|
# 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:
|
|
from_secret: 'drone_user'
|
|
key:
|
|
from_secret: 'drone_ssh_key'
|
|
script:
|
|
|
|
# kubernetes deployment
|
|
- 'kubectl -n start-simoncor-net rollout restart deployment start-simoncor-net'
|