Configuring  WebHooks:

ARTIFACTORY: How to test webhooks in Artifactory and check its request payload

AuthorFullName__c
Tatarao Vana
articleNumber
000005234
ft:sourceType
Salesforce
FirstPublishedDate
2022-03-29T10:44:11Z
lastModifiedDate
2022-03-29
VersionNumber
7
In order to configure Webhook in Artifactory, navigate to Administration Module | General | Webhooks section and click on the New Webhook option.

Open the test webhook website(https://webhook.site/) which is publicly available. This site will provide us with the sample URL for configuring the webhook and checking the request payload.

In the webhook configuration, provide the webhook name, description, and unique URL from the above website. Use the proxy configuration if needed or you may leave it blank. Select the event(Ex: Artifact was deployed) in the Events section to trigger the Webhook notification.

In this example, we are not using any sort of authentication. In case if we configure the actual webhook URL which might require the authentication or custom headers, we can specify it in the platform UI.

Here is the screenshot of the example webhook configuration and successful test connection.

User-added image


User-added image

The payload of the webhook looks like below.

User-added image

In this article, we have provided details about how to configure a sample webhook. However, we can configure the actual URL of the Webhook endpoint similarly.

By default, private networks are not allowed to be used as Webhook targets for security reasons and would not pass validation. In that case, we recommend setting the following parameters in system.yaml file for event service as mentioned in how to disable Artifactory Webhook validation
webhooks:
urlStrictPolicy: false

Logging:
In case of issues, you may enable the Event service debugging in the system.yaml file to understand the root cause of it. Below change requires restart of the Artifactory service.
  event:
    logging: 
      application:
        level: "debug"