Add Discord Notification
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing

This commit is contained in:
Tobias Manske 2022-09-30 12:35:01 +02:00
parent 4019ae444f
commit f371424cdd
Signed by: tobias
GPG Key ID: E83C743C1FC2F79A

View File

@ -1,6 +1,7 @@
---
kind: pipeline
type: docker
name: default
name: Ansible-Playbook
trigger:
branch:
@ -8,9 +9,11 @@ trigger:
event:
include:
- push
- cron
- custom
node:
ansible: true
steps:
- name: Run Ansible
image: registry.tobiasmanske.de/ansible-runner:latest
@ -18,9 +21,20 @@ steps:
commands:
- cd coreos-config
- ansible-playbook --private-key /ssh_key --inventory=inventory.yaml playbook.yaml
node:
ansible: true
- name: Notify Discord
when:
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:
- registry