Add Discord Notification
This commit is contained in:
parent
4019ae444f
commit
f371424cdd
24
.drone.yml
24
.drone.yml
@ -1,6 +1,7 @@
|
|||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: Ansible-Playbook
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
@ -8,9 +9,11 @@ trigger:
|
|||||||
event:
|
event:
|
||||||
include:
|
include:
|
||||||
- push
|
- push
|
||||||
- cron
|
|
||||||
- custom
|
- custom
|
||||||
|
|
||||||
|
node:
|
||||||
|
ansible: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run Ansible
|
- name: Run Ansible
|
||||||
image: registry.tobiasmanske.de/ansible-runner:latest
|
image: registry.tobiasmanske.de/ansible-runner:latest
|
||||||
@ -18,9 +21,20 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- cd coreos-config
|
- cd coreos-config
|
||||||
- ansible-playbook --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
|
- ansible-playbook --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
|
||||||
|
- name: Notify Discord
|
||||||
node:
|
when:
|
||||||
ansible: true
|
status:
|
||||||
|
- failure
|
||||||
|
image: appleboy/drone-discord
|
||||||
|
settings:
|
||||||
|
webhook_id:
|
||||||
|
from_secret: discord_webhook_id
|
||||||
|
webhook_token:
|
||||||
|
from_secret: discord_webhook_token
|
||||||
|
message: >
|
||||||
|
{{repo.name}}
|
||||||
|
Deployment {{build.number}} failed!
|
||||||
|
{{build.link}}
|
||||||
|
|
||||||
image_pull_secrets:
|
image_pull_secrets:
|
||||||
- registry
|
- registry
|
||||||
|
Loading…
Reference in New Issue
Block a user