Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
1.8M

slack-notifier 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_ACTIONS - Required in template mode, Override actions in SLACK_TEMPLATE_BODY, should be array. Documentation https://api.slack.com/docs/message-attachments
  • 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
    SendToSlack:
  type: slack-notifier
  arguments:
    SLACK_HOOK_URL: '${{SLACK_WEBHOOK_URL}}'
    SLACK_TEXT: '${{SLACK_TEXT}}'
    SLACK_ATTACHMENTS: '${{SLACK_ATTACHMENTS}}'

  
github.com
Pavel Kostohrys
Jul 4, 2021