Skip to main content

Adding outgoing webhooks

Abstract

You can create outgoing webhooks so that Bitrise automatically sends build event notifications to any service you would like.

You can configure Bitrise to send build event notifications to any service you would like. A build event is:

  • When a build is started.

  • When a build ends.

You can use this notification to share build statuses with your git provider if we don’t support it yet, notify only the right team about build success or failure, or use it to automate your in-house release pipeline.

You can add, remove and edit your webhooks easily on the website interface.

Accessing services that are behind a firewall

If you need to access a service that is behind a firewall, you can't use outgoing webhooks: the payload won't get past the firewall. To access such a service, we recommend configuring the firewall to allow the Bitrise build machines to access it, and then make the request from within the build machine. For more information on how to do so, check out the relevant guides:

Adding an outgoing webhook to an app

You can set up and configure the webhooks sent by Bitrise on the web UI. Let’s see how!

Admin access only

Only users with the role of admin on the app's team can access all functions of the App Settings page of an app.

  1. Open your app on Bitrise.

  2. Click on App Settings.

  3. On the left, select Integrations.

  4. Scroll down to Outgoing Webhooks.

  5. Click Add webhook.

  6. Enter the URL of the service where you wish to send the notification in the URL field.

    apps-outgoing-webhooks.png
  7. Select either the Send me everything or the Select individual events option.

    • Send me everything: every supported event type will trigger the webhook. Currently, only build events are supported but there will be other options in the future!

    • Select individual events: you can specify the individual events that should trigger the webhook.

  8. Optionally, add custom headers to your webhook: in the Headers section, specify a name and a value for the header. When done, click Add header.

    For example, if you have an API listening to the webhook, you can track the requests with API keys set as a custom header.

  9. Click Create Webhook.

And you’re done! You can modify your webhook at any time by clicking the pencil icon next to the webhook.

Adding custom headers to outgoing webhooks

You can add extra headers to your outgoing webhooks via the Code tab of the web interface. For example, if you have an API listening to the webhook, you can track the requests with API keys set as a custom header.

You can add custom headers either when:

To add the header:

  1. Find the WEBHOOK HEADERS section.

    Adding outgoing webhooks
  2. Add a key and a value to the header. You need both to be able to save the header.

  3. Click Add header.

  4. Click Create webhook/Update webhook.

Checking outgoing webhook deliveries

You can check the recent deliveries of your outgoing webhooks at any time, and resend them if necessary. The deliveries are marked with appropriate status code, depending on whether the delivery was successful.

Admin access only

Only users with the role of admin on the app's team can access all functions of the App Settings page of an app.

  1. Open your app on Bitrise.

  2. Click on App Settings.

  3. On the left, select Integrations.

  4. Scroll down to Outgoing Webhooks.

  5. Find your webhook and select the recent-deliveries.svg icon.

  6. Select a delivery and expand it to show the full request and the response.

    webhooks-redeliver.png
  7. You can redeliver the webhook payload at any time. Find the delivery you need and click the redeliver.svg icon next to it.

    Editing the payload

    Before trying to deliver the webhook payload again, you can edit the webhook configuration. Close the Recent deliveries pop-up window and click the edit-webhook.svg icon next to the webhook to edit it. When finished, click Update webhook.