drone: use docker for ssh
continuous-integration/drone/push Build was killed Details

ssh pipelines require a separate runner
master
pictuga 2021-12-14 15:33:38 +00:00
parent 495bd44893
commit 89f5d07408
1 changed files with 18 additions and 19 deletions

View File

@ -63,24 +63,23 @@ depends_on:
--- ---
kind: pipeline kind: pipeline
type: ssh name: ssh
name: prod
server: clone:
host: disable: true
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps: steps:
- name: install - name: deploy
commands: image: appleboy/drone-ssh
- sudo pip install --upgrade morss[full] settings:
host:
- name: reload from_secret: ssh_host
commands: username:
from_secret: ssh_user
key:
from_secret: ssh_key
script_stop: true
script:
- "pid=$$(sudo pidof 'gunicorn: master [morss]')" - "pid=$$(sudo pidof 'gunicorn: master [morss]')"
- sudo kill -s USR2 $$pid - sudo kill -s USR2 $$pid
- sudo kill -s WINCH $$pid - sudo kill -s WINCH $$pid