Easily integrate custom Discord notifications into your CircleCI projects. Create custom alert messages for any job or receive status updates.
Learn more about Orbs.
Example config:
version: 2.1
orbs:
discord: teka23/[email protected]/*
jobs:
build:
docker:
- image: <docker image>
steps:
- discord/<command>
[email protected]
from the teka23
namespace is imported into the config.yml as discord
and can then be referenced as such in any job or workflow.
Because these scripts use bash-specific features, Bash
is required.
Bash
is the default shell used on CircleCI and the Orb will be compatible with most images.
If using an Alpine
base image, you will need to call apk add bash
before calling this Orb,
or create a derivative base image that calls RUN apk add bash
.
If Bash
is not available, an error message will be logged and the task will fail.
cURL is used to post the Webhook data and must be installed in the container to function properly.
Full instructions can be found at Discord: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
You can find instructions at https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-
You can implement the Webhook in one of two ways, either as an environment variable, or as a parameter.
- In the settings page for your project on CircleCI, click
Environment Variables
. From that page you can click theAdd Variable
button. Finally, enter your webhook as the value, andDISCORD_WEBHOOK
as the name. - You can enter the Webhook for the individual status or alert by entering it at the
webhook
parameter, as shown above.
We welcome issues to and pull requests against this repository! For further questions/comments about this or other orbs, visit CircleCI's Orbs discussion forum.
This project is licensed under the MIT License - read LICENSE file for details.