Receiving webhooks
Receiving webhooks facilitate integration with third-party applications. These webhooks accept a JSON body containing configuration parameters that can be utilized in build blueprints. Once a receiving webhook is triggered, any blueprint can be used to initiate a new build.
Creating
Click “Receive” under the Webhooks option in the left-side menu.
Click “+ New Receiving Webhook.”
Enter a descriptive name (e.g., “Receive GitHub Events”).
Select the previously created secret.
Click “Save.”
Once saved, the receiving webhooks should look like this:
Receiving rules
In this case, we don’t want every event to trigger a build. Instead, we want to filter events to only those that affect the branch containing the word “master.” In other words, builds should only be triggered when changes are made to the master branch.
Click the new receiving webhook.
Click the “Receiving Rules” tab.
Select “ref” from the first dropdown (Field dropdown).
Select “Wildcard ~* (case-insensitive)” from the Operator dropdown, similar to the ILIKE operator (in SQL).
Type the word “master.”
You can add as many rules as desired; all of them will be applied using an AND operator. This means that all conditions must be met for the webhook to be triggered.
Build Matrix
This section allows you to select what to build after a webhook has been received and all rules are valid.
Select the “Matrix Blueprint” tab.
Click the previously created blueprint.