Skip to content

A post-build plugin that sends the build status to a Discord channel.

License

Notifications You must be signed in to change notification settings

raghuchinnannan/jenkins-discord

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Notifier

Discord Notifier provides a bridge between Jenkins and Discord through the built-in webhook functionality.

The purpose

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

Download

You'll have to manually install the plugin via the advanced tab of your plugin settings. A Jenkins plugin repo build will be available soon.

Usage

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.

Post-build dropdown with Discord Webhooks selected

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

Standard options in the Discord Webhook config Advanced tab in the config

Pipeline

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.

Parameters

  • 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
  • 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).

Example


discordSend description: 'Jenkins Pipeline Build', footer: 'Footer Text', link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: 'Webhook URL'

About

A post-build plugin that sends the build status to a Discord channel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 89.7%
  • HTML 10.3%