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:
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue