Skip to main content

Adding incoming webhooks

Abstract

An incoming webhook on Bitrise serves one purpose: to start builds automatically when a certain code event (code push, Git Tag, pull request) happens. You can setup incoming webhooks manually or automatically when adding your app to Bitrise.

Most source code hosting service provides a feature to register webhooks. A webhook is basically an URL which will be called on specified events.

An incoming webhook on Bitrise serves one purpose: to start builds automatically when a certain code event (code push, Git Tag, pull request) happens. You just need to register an incoming webhook to your repository and configure build triggers.

Registering an incoming webhook automatically

Automatic webhook registration is supported for apps hosted on GitHub, GitLab and Bitbucket.

If you select GitHub, GitLab, or Bitbucket as the source code provider when you add your app Bitrise automatically sets up a webhook for it with a click of a button at the end of your app setup journey.

However, you can always change this webhook later or add a new one if you skipped registering a webhook when adding the app.

You can automatically register a webhook to the repository on the Code tab of the app. Automatic registration means that Bitrise registers the webhook at the repository, so you don't have to manually go there and add it on your Git provider's website. This requires:

  • That you have admin rights to the repository.

  • That the account that hosts the repository is connected to your Bitrise account.

To register a webhook automatically:

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. Make sure your Bitrise account is connected to the Git provider account that hosts the repository and that your Git account has admin rights to the repository.

  2. Open your app on Bitrise.

  3. Click on App Settings.

  4. On the left, select Integrations.

  5. Click Set up webhooks automatically.

Bitrise will automatically register a webhook at the app's repository.

Registering an incoming webhook manually

You can manually setup or change your webhooks after you registered your app on Bitrise. The process is different depending on your Git provider but on Bitrise, the basic steps are the same for each.

Create your own webhook implementation

Our webhook processor is Open Sourced. If you are looking for an unsupported solution, you can create an issue on the GitHub page or create a pull request with the implementation. You can also run your own webhook provider behind your own firewall if required.

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. Click Set up webhooks manually.

  4. In the pop-up window, select your service from the dropdown menu.

    apps-webhooks-select.png
  5. Copy the webhook URL and register it at your Git provider.