Drone plugins > Slack Blame
slack.svg

Slack Blame

by drone-plugins


Use the Slack Blame plugin to send a message to a Slack channel or through direct message when a build completes. You will need to supply Drone with an access token to the Slack API. You can create a new access token at [https://api.slack.com/web](https://api.slack.com/web).

Example

kind: pipeline
name: default

steps:
- name: notify
image: plugins/slack-blame
settings:
  token: your-secret-token
  channel: dev
  success_template: |
    The build is fixed! Thanks @{{slack.name}}
  success_image_attachments:
    - "http://i.imgur.com/TP4PIxc.jpg"
  failure_template: |
    The build is broken! Blame {{slack.name}}
  failure_image_attachments:
    - "http://cdn.meme.am/instances/51000361.jpg"

Properties

  • token

    stringrequired

    Slack access token.

    Secret recommended

    Default: none

  • channel

    stringoptional

    Slack channel.

    Default: none

  • mapping

    arrayoptional

    Mapping of authors to Slack users. Supports environment variable interpolation, e.g. {"$DRONE_COMMIT_AUTHOR": "$SLACK_USER"}.

    Default: none

  • success_username

    stringoptional

    Username for successful builds.

    Default: none

  • success_icon

    stringoptional

    Icon for successful builds.

    Default: none

  • success_template

    stringoptional

    Template for successful builds.

    Default: none

  • success_image_attachments

    arrayoptional

    List of image attachments for successful builds.

    Default: none

  • failure_username

    stringoptional

    Username for failed builds.

    Default: none

  • failure_icon

    stringoptional

    Icon for failed builds.

    Default: none

  • failure_template

    stringoptional

    Template for failed builds.

    Default: none

  • failure_image_attachments

    arrayoptional

    List of image attachments for failed builds.

    Default: none