drone-matternotify
is a Drone Plugin used to send notifications to Mattermost
via Incoming Webhooks
.
Add a new Step in your .drone.yml
file:
[...]
- name: MatterNotify
image: macchie/drone-matternotify
settings:
webhook: "https://your.mattermost.hosted/hooks/123456567657567567"
channel: "#example-channel"
username: "MatterNotify Custom Username"
icon_url: "https://i.postimg.cc/VkyND0vs/bot.png"
title: "A new hope on {{DRONE_REPO_OWNER}}/{{DRONE_REPO_NAME}}, version is now {{DRONE_TAG}}!"
title_link: "https://github.com/{{DRONE_REPO_OWNER}}/{{DRONE_REPO_NAME}}/commit/{{DRONE_COMMIT}}"
text: ":rocket: Released by [{{DRONE_COMMIT_AUTHOR_NAME}}](mailto:{{DRONE_COMMIT_AUTHOR_EMAIL}})."
mailto: "[email protected]"
mailto_subject: "Version is now {{DRONE_TAG}}!"
mailto_label: "Share the Secret!"
mailto_cc:
- "[email protected]"
- "[email protected]"
- "{{DRONE_COMMIT_AUTHOR_EMAIL}}"
[...]
webhook
: mandatory, your Mattermost Incoming WebHook URLchannel
: mandatory, your Mattermost Channel Nameusername
: optional, depending on your Mattermost configuration this could either be forced on the WebHook definition or the default for your Mattermost setupicon_url
: optional, depending on your Mattermost configuration this could either be forced on the WebHook definition or the default for your Mattermost setuptitle
: optional, defaults toNew release of {{DRONE_REPO}}@{{DRONE_TAG}}!
title_link
: optionaltext
: optional, additional text to append to your Notificationmailto
: optional, if specified automatically prepends a link to the message to send an email to the specified addressmailto_cc
: optional, add cc recipients to yourmailto
mailto_subject
: optional, customize your email subject, defaults totitle
mailto_label
: optional, customize link text in message, defaults toSend notification email
You are free to embed every environment variable in the following parameters:
title
title_link
text
mailto_cc
mailto_label
mailto_subject
Variables may be added inside text using the syntax {{ENV_VARIABLE_NAME}}
, for example: {{DRONE_REPO}}
.
Check Drone Docs for all the available Environment variables here.