Skip to content

A Jenkins plugin for posting notifications to a Discord

Notifications You must be signed in to change notification settings

lltcggie/discord-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord plugin for Jenkins

Provides Jenkins notification integration with Discord.

Install Instructions

  1. Get a Discord Webhook ID and Webhook Token(Integration Token): https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks
  2. Install this plugin on your Jenkins server
  3. Configure it in your Jenkins job (and optionally as global configuration) and add it as a Post-build action.

Webhook ID and Webhook Token(Integration Token): https://discordapp.com/api/webhooks/(Webhook ID)/(Webhook Token)

Security

Use Jenkins Credentials and a credential ID to configure the Slack integration token. It is a security risk to expose your integration token using the previous Integration Token setting.

Create a new Secret text credential: image

Select that credential as the value for the Integration Token Credential ID field: image

Bot user option

This plugin supports sending notifications via bot users. You can enable bot user support from both global and project configurations. If the notification will be sent to a user via direct message, default integration sends it via @slackbot, you can use this option if you want to send messages via a bot user. You need to provide credentials of the bot user for integration token credentials to use this feature.

Jenkins Pipeline Support

Includes Jenkins Pipeline support as of version 2.0:

slackSend color: 'good', message: 'Message from Jenkins Pipeline'

Developer instructions

Install Maven and JDK. This was last build with Maven 3.2.5 and OpenJDK 1.7.0_75 on KUbuntu 14.04.

Run unit tests

mvn test

Create an HPI file to install in Jenkins (HPI file will be in target/slack.hpi).

mvn package

About

A Jenkins plugin for posting notifications to a Discord

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 94.6%
  • HTML 5.1%
  • Groovy 0.3%