slack-notifier

Send message to slack

Arguments

  • MODE - template | simple | default-template, by default - simple. In case with template mode you can have general body in attachment SLACK_TEMPLATE_BODY and different fields SLACK_TEMPLATE_FIELDS
  • SLACK_ATTACHMENTS - Attachments to send. Documentation https://api.slack.com/docs/message-attachments
  • SLACK_HOOK_URL * - Url to the channel
  • SLACK_TEMPLATE_BODY * - Required in template mode, general body, should be not array. Support only one attachment in body. Documentation https://api.slack.com/docs/message-attachments
  • SLACK_TEMPLATE_FIELDS * - Required in template mode, Override fields in SLACK_TEMPLATE_BODY, should be array. Documentation https://api.slack.com/docs/message-attachments
  • SLACK_TEXT * - Message to send
    version: '1.0'
steps:
  SendToSlack:
    type: slack-notifier
    arguments:
      SLACK_HOOK_URL: '${{SLACK_WEBHOOK_URL}}'
      SLACK_TEXT: '${{SLACK_TEXT}}'
      SLACK_ATTACHMENTS: '${{SLACK_ATTACHMENTS}}'

  
github.com
Pavel Kostohrys
Sep 18, 2019