Discord webhook notifications.

This commit is contained in:
Stanislav Nikitin 2019-10-12 05:55:15 +05:00
parent c1d600ab9b
commit 38b9b426f7
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE

View File

@ -4,12 +4,35 @@ type: docker
name: build
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: dockerhub_user
password:
from_secret: dockerhub_password
repo: pztrn/java
auto_tag: true
- name: notify-start
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: 'Starting building **{{repo.name}}#{{build.number}}** @ {{datetime build.started "02-Jan-2006 15:04:05 MST" "Asia/Yekaterinburg"}} (See {{build.link}} for logs).'
- name: docker
image: plugins/docker
settings:
username:
from_secret: dockerhub_user
password:
from_secret: dockerhub_password
repo: pztrn/java
auto_tag: true
- name: notify-end
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: "
{{#success build.status}}
build {{build.number}} deployed.
{{ else }}
build {{build.number}} failed. See {{build.link}}.
{{/success}}"