This topic describes how to use an HTTP event source to integrate Gitee with EventBridge.
Background information
Gitee is a Git-based code hosting platform that provides stable hosting services for developers. EventBridge supports fast integration with Gitee to manage alerts and events in a centralized manner.
Before you begin
Step 1: Create an event source for Gitee 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.
Step 2: Configure a webhook in Gitee
Log on to the Gitee console and click the name of a code repository on the Repositories page.
In the top navigation bar, click Settings. On the Settings page, click WebHooks in the left-side navigation pane.
In the upper-right corner of the WebHooks page, click Add WebHook.
On the Add WebHook page, follow the on-screen instructions to configure the parameters and click Add.
URL: Enter the Internet request URL that is generated in Step 1: Create an event source for Gitee in EventBridge.
Events: Select one or more operations as the condition for triggering an event. For example, if you set this parameter to Push, an event is triggered when you perform a Push operation.
Step 3: Trigger an event
After you add a webhook, you can click Test on the page that appears to trigger a test event.
Step 4: Verify the result
- Log on to the EventBridge console.
- In the top navigation bar, select the region.
- In the left-side navigation pane, click Event Buses.
In the left-side navigation pane, click Event Tracking to view and verify the obtained event information.