Move notification to be a step. Add privileged mode to restart step

This commit is contained in:
Robert Marshall 2019-08-26 17:14:36 +01:00
parent cb1c47c44e
commit 2653e7f69b

View file

@ -9,13 +9,6 @@ volumes:
host:
path: /var/www/Website
pipeline:
notify:
image: drillster/drone-email
host: 192.168.1.3
from: build@robware.uk
when:
status: [ changed, failure ]
steps:
- name: build and publish
@ -35,6 +28,7 @@ steps:
- cp Infrastructure/website.service output/
- cp -r ./output/* /output
- name: restart service
privileged: true
image: appleboy/drone-ssh
settings:
host:
@ -44,4 +38,13 @@ steps:
password:
from_secret: SSHPassword
script:
- service website restart
- service website restart
- name: notify
image: drillster/drone-email
settings:
host: 192.168.1.3
from: build@robware.uk
when:
status:
- changed
- failure