CircleCI Orb for sending Slack messages via webhooks.
Find a file
2020-10-17 22:54:45 +09:00
CHANGELOG.md Fix changelog 2020-10-17 22:15:00 +09:00
LICENSE Add initial orb config. 2020-10-17 19:32:37 +09:00
README.md Fix typo 2020-10-17 22:54:45 +09:00
slack-webhook-orb.yml Add disclaimer to example usages 2020-10-17 22:09:12 +09:00

Slack Webhook CircleCI Orb CircleCI Orb Version

Setup

  1. Create a webhook.
  2. Generate a JSON payload.
  3. Place the webhook in a CircleCI environment variable (SLACK_WEBHOOK by default, but customizable).
  4. Call the orb:
    slack-webhook/send-message:
      json-payload: |
        {
          "blocks": [
            {
              "type": "section",
              "text": {
                "type": "mrkdwn",
                "text": "Hello from <https://github.com/adamu|@adamu>'s `slack-webhook` CircleCi orb! 👋"
              }
            }
          ]
        }    
    

Usage

The json-payload argument must always be provided.

There are three ways to provide the webhook URL:

  1. Via the SLACK_WEBHOOK environment variable.
  2. Via a custom environment variable. Provide the name with the webhook-url-env-var parameter.
  3. Directly to the webhook with the webhook-url parameter.

See the full examples on the orb's CircleCI Orb Repository listing.

Changelog

See the CHANGELOG.