Move notification to be a step. Add privileged mode to restart step
This commit is contained in:
parent
cb1c47c44e
commit
2653e7f69b
1 changed files with 11 additions and 8 deletions
|
@ -9,13 +9,6 @@ volumes:
|
||||||
host:
|
host:
|
||||||
path: /var/www/Website
|
path: /var/www/Website
|
||||||
|
|
||||||
pipeline:
|
|
||||||
notify:
|
|
||||||
image: drillster/drone-email
|
|
||||||
host: 192.168.1.3
|
|
||||||
from: build@robware.uk
|
|
||||||
when:
|
|
||||||
status: [ changed, failure ]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build and publish
|
- name: build and publish
|
||||||
|
@ -35,6 +28,7 @@ steps:
|
||||||
- cp Infrastructure/website.service output/
|
- cp Infrastructure/website.service output/
|
||||||
- cp -r ./output/* /output
|
- cp -r ./output/* /output
|
||||||
- name: restart service
|
- name: restart service
|
||||||
|
privileged: true
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
|
@ -44,4 +38,13 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: SSHPassword
|
from_secret: SSHPassword
|
||||||
script:
|
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
|
Loading…
Add table
Add a link
Reference in a new issue