All Products
Search
Document Center

EventBridge:Integrate Jenkins

Last Updated:Sep 22, 2023

This topic describes how to use an HTTP event source to integrate Jenkins with EventBridge.

Background information

Jenkins is a Java-based tool for continuous integration. You can use Jenkins to build and test software projects in a continuous and automatic manner. You can also use Jenkins to monitor the status of external tasks. EventBridge supports fast integration with Jenkins to manage alerts and events in a centralized manner.

Before you begin

Step 1: Create an event source for Jenkins in EventBridge

Create an event source of the HTTP/HTTPS Events type in the EventBridge console. The following table describes the parameters. For more information, see Create a custom event source of the HTTP/HTTPS Events type.

  • Request Type: Select HTTP&HTTPS.

  • Request Method: Select a POST.

  • Security Configuration: Select Optional.

After the event source is created, you can find the custom event source in the event source list, and then click Details to view the configuration information. Internet request URL can be used as the webhook URL of the event source. pic-1

Step 2: Configure job notifications in Jenkins

  1. Start Jenkins, select a build job, and then click Notifications.

  2. Click the Job Notifications tab.

  3. On the Job Notifications tab, set the URL Source parameter to the Internet request URL that you obtained in Step 1: Create an event source for Jenkins in EventBridge. Then, click Save.

Step 3: Trigger an event

In the job list on the Jenkins homepage, find the build job for which you have configured job notifications and click the Build icon.

Step 4: Verify the result

  1. Log on to the EventBridge console.
  2. In the top navigation bar, select the region.
  3. In the left-side navigation pane, click Event Buses.
  4. In the left-side navigation pane, click Event Tracking to view and verify the obtained event information.