Continuous integration within Gearset is a powerful tool, but what if you need to trigger third-party services as part of your release process? 

Outgoing webhooks allow you to automate this process, so you can kick off Selenium tests (for example) if your CI job runs successfully.

Any service with an API can be triggered directly from within Gearset.

Setting up a CI job with outgoing webhooks

To create a CI job with outgoing webhooks, start by following the usual setup process.  On the Outgoing webhooks tab you can add the URL you’d like Gearset to POST to, and select which events you would like the webhook to trigger on.

If you are using a custom payload then you can choose whether you’d like to use Basic Authentication or an Authorization HTTP request header, then add the payload in either json or xml format. When the chosen events are triggered by the CI job we'll send a POST request with the payload you provide to the URL. For custom payloads we don't add any information about the job name or status, so you'll need to include any references you need in that payload. Multiple outgoing webhooks are supported, so you can simultaneously trigger various services to create more customised flows.

Common Integrations

Many customers look to integrate Outgoing Webhooks from Gearset with a selection of common 3rd party tools. Here are some useful resources to help you set up your integrations with these platforms.

Slack

Gearset offers out of the box integration with Slack notifications. Our default integration, containing dynamic information about your CI jobs, can be configured on the Notification settings tab.

However, customised static content can also be sent to Slack by configuring an outgoing webhook. You'll need to begin by creating an Incoming webhook URL from Slack, and then adding whatever content you would like as a JSON formatted payload. The Slack webhook URL already contains an authentication secret, so no additional authentication needs to be provided.

Azure DevOps

To trigger events in Azure DevOps, you will need to use their public REST API. Once you have found the appropriate POST endpoint, add that to the Url field. You will then need to generate a custom JSON payload based on the chosen endpoint's documentation.

Customers often want to queue a build in Azure DevOps once a CI job has succeeded - this REST API endpoint is documented here.

Azure DevOps' REST API requires authentication - you will need to create a Personal Access Token (PAT) with appropriate permissions. Then, Base64 encode your username and PAT following the instruction here. Select Authorization as the authentication type for the outgoing webhook, and add the Base64 encoded string to the credentials field.

Is a guide for your integration missing? Let us know!

Did this answer your question?