Discord Notifier provides a bridge between Jenkins and Discord through the built-in webhook functionality.
The Jenkins Discord Webhook plugin was made to share results of a build to a Discord channel using the webhooks that Discord provides.
Through this plugin you are able to:
- Get success and fail messages about your build
- Link to build artifacts
- List SCM changes to the build
- Only send notifications on state change
Discord notifier is available in official jenkins repos.
This plugin uses the post-build feature to execute a request.
After installing, go to your job's configure section and add the Discord Notifier item. Then proceed to enter your webhook URL.
There are a few options you can choose from:
- Webhook URL
- The URL of the webhook (pretty self-explanatory) provided by Discord
- Send only on state change
- Checking this will only send the message when the state of the current build differs from the previous
- Advanced:
- thumbnail
- If set, the image under the URL shows up on the right side of Discord message.
- Enable URL linking
- Enables the title, build summary and build id to be linked to the build. Requires the URL to be set in Jenkin's global configuration
- Enable artifact list
- Enables the listing of the artifacts generated by the build
- Enable version info in footer
- Adds the "Jenkins version, Discord Webhook version" text in the footer of the message
- thumbnail
Discord Notifier supports Jenkins Pipeline. The only required parameter is webhookURL (the URL of the webhook, of course) - but there isn't much point of sending nothing.
- webhookURL (required)
- The URL of the webhook (pretty self-explanatory) provided by Discord.
- title
- The title of the embed.
- link
- If set, the title becomes a link to this URL.
- thumbnail
- If set, the image under the URL shows up on the right side of Discord message.
- image
- If set, the image under the URL shows up under discord message
- description
- The description of the message (the main chunk of text), can be markdown formatted, Markdown Text 101 (Chat Formatting: Bold, Italic, Underline).
- footer
- The text in footer of the message.
- result
- Sets the left side colour of the embed (SUCCESS - green, UNSTABLE - yellow, FAILURE - red, ABORTED - grey).
discordSend description: "Jenkins Pipeline Build", footer: "Footer Text", link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: "Webhook URL"