A plugin to send notifications to Matrix chat rooms from CI pipeline steps. Supports Jinja message templates and Markdown rendering.
Example
kind: pipeline
type: docker
name: default
steps:
- name: notify
image: spotlightkid/drone-matrixchat-notify
settings:
homeserver: 'https://matrix.org'
roomid: '!xxxxxx@matrix.org'
userid: '@drone-bot@matrix.org'
password:
from_secret: drone-bot-pw
markdown: 'yes'
template: |
`${DRONE_REPO}` build #${DRONE_BUILD_NUMBER} status: **${DRONE_BUILD_STATUS}**
${DRONE_PULL_REQUEST_TITLE}](${DRONE_COMMIT_LINK})
Properties
roomid
stringrequiredID of matrix chat room to send messages to (ID, not alias).
Default: none
userid
stringrequiredMatrix user ID to send message as (ID, not username).
Default: none
password
stringrequiredPassword to use for authenticating the user set with `userid`. Either a password or an access token is required.
Secret recommendedDefault: none
accesstoken
stringrequiredAccess token to use for authentication instead of `password`. Either an access token or a password is required.
Secret recommendedDefault: none
allowed_attrs
arrayoptionalList or string with comma-separated list of HTML attribute names or dict mapping tag names to lists of attributes names.
Default: `DEFAULT_ALLOWED_ATTRS`
allowed_tags
arrayoptionalList or set or string with comma-separated list of HTML tag names. HTML tags not included will be stripped from the HTML output generated by rendering a Markdown message template.
Default: `DEFAULT_ALLOWED_TAGS`
deviceid
stringoptionalDevice ID to send with access token.
Default: none
devicename
stringoptionalDevice name to send with access token.
Default: none
homeserver
stringoptionalThe Matrix homeserver URL.
Default: https://matrix.org
jinja
booleanoptionalIf set to true, `yes`, `y`, `true`, `t`, `on` or `1`, the message template is rendered with the Jinja templating engine.
Default: none
markdown
booleanoptionalIf set to true, `yes`, `y`, `true`, `t`, `on` or `1`, the message resulting from template substtution is considered to be in Markdown format and will be rendered to HTML.
Default: none
pass_environment
arrayoptionalComma-separated white-list of environment variable names or name shell-glob patterns. Only environment variables matching any of the given names or patterns will be available as valid placeholders in the message template.
Default: DRONE_*
markdown_extensions
arrayoptionalComma-separated list of enabled Markdown extensions.
Default: admonition, extra, sane_lists, smarty
template
stringoptionalThe message template. Valid placeholders (example: `${DRONE_REPO}`) will be substituted with the values of the matching environment variables (subject to filtering according to the `pass_environment` setting).
Default: ${DRONE_BUILD_STATUS}