simoncor.net/.drone.yaml

79 lines
2.0 KiB
YAML
Raw Normal View History

---
# deployment
kind: 'pipeline'
type: 'docker'
name: 'deployment'
# disable clone
clone:
disable: true
# deployment steps
steps:
2022-04-22 10:49:46 +02:00
# simoncor.net deployment
2022-04-22 10:51:20 +02:00
- name: 'rp01 - simoncor.net'
image: 'appleboy/drone-ssh:1.6.3'
settings:
# bastion
proxy_host: 'siempie.com'
proxy_port: '22'
proxy_user:
from_secret: 'drone_user'
proxy_key:
from_secret: 'drone_ssh_key'
# rp01.siempie.local
host: 'rp01.siempie.local'
port: '22'
user:
from_secret: 'drone_user'
key:
from_secret: 'drone_ssh_key'
script:
# make sure all is clean
2022-05-11 17:15:36 +02:00
- 'sudo /usr/bin/git -C /var/www/simoncor.net reset --hard HEAD'
- 'sudo /usr/bin/git -C /var/www/simoncor.net clean -fX'
- 'sudo /usr/bin/git -C /var/www/simoncor.net clean -fd'
# fetch latest checkout
2022-05-11 17:15:36 +02:00
- 'sudo /usr/bin/git -C /var/www/simoncor.net fetch'
- "sudo /usr/bin/git -C /var/www/simoncor.net -c advice.detachedHead=false
checkout '${DRONE_COMMIT_SHA:0:8}'"
2022-04-22 10:50:55 +02:00
# simoncor.net deployment
2022-04-22 10:51:20 +02:00
- name: 'rp02 - simoncor.net'
image: 'appleboy/drone-ssh:1.6.3'
settings:
# bastion
proxy_host: 'siempie.com'
proxy_port: '22'
proxy_user:
from_secret: 'drone_user'
proxy_key:
from_secret: 'drone_ssh_key'
# rp02.siempie.local
host: 'rp02.siempie.local'
port: '22'
user:
from_secret: 'drone_user'
key:
from_secret: 'drone_ssh_key'
script:
# make sure all is clean
2022-05-11 17:15:36 +02:00
- 'sudo /usr/bin/git -C /var/www/simoncor.net reset --hard HEAD'
- 'sudo /usr/bin/git -C /var/www/simoncor.net clean -fX'
- 'sudo /usr/bin/git -C /var/www/simoncor.net clean -fd'
# fetch latest checkout
2022-05-11 17:15:36 +02:00
- 'sudo /usr/bin/git -C /var/www/simoncor.net fetch'
- "sudo /usr/bin/git -C /var/www/simoncor.net -c advice.detachedHead=false
checkout '${DRONE_COMMIT_SHA:0:8}'"