From f371424cdd6ba11ec058aada41cafe35ed73cda4 Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Fri, 30 Sep 2022 12:35:01 +0200 Subject: [PATCH] Add Discord Notification --- .drone.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0a4f733..93d5f86 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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