Here's how to set up a Jenkins webhook. Once configured, you can route Jenkins Notifications to alerts in a Slack channel, create incidents tied to those alerts, and invoke Transposit actions to remediate the incidents.
Transposit webhook setup#
- On the Transposit site, navigate to Settings gear icon > Webhooks, and click Add webhook. Choose "Jenkins build integrator." All incoming alerts will always appear in the Activity feed. It is optional to also set a Slack channel for the alert to appear in. (Note: The Slack channel must already exist; create it before adding the webhook.) Click Add.
- Find the webhook you just added, and copy the "Endpoint URL."
Jenkins webhook setup#
Install the Notification plugin#
- In Jenkins, Navigate to the plugin manager under Manage Jenkins > Manage Plugins, and click on the Available tab.
- Search for "Notification", check the box beside the plugin named "Notification", and then click the Install without restart button to install it.
Note: If you don't see the "Notification" plugin listed, check if it is already listed in the Installed tab.
Edit job configuration#
- In Jenkins, navigate to the job you would like to call this webhook, and click Configure in the right menu. Click the Job Notifications tab in the top menu, and then click the Add Endpoint button.
- Set the "Event" select menu to the type of events you would like to receive alerts for, set the "URL" field to the Endpoint URL you copied from Transposit, and click Save.
Jenkins is now setup to call this webhook as defined in the Job Notifications Event select menu.