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.

Webhook issues

If your builds triggers don't work, there might be a problem with your webhooks: Builds aren't getting triggered.

Registering an incoming webhook automatically

Automatic webhook registration is supported for apps that have their code hosted on GitHub, GitLab and Bitbucket.

If you use one of the above services as your source code hosting provider, Bitrise automatically sets up a webhook for it with a click of a button at the end of your app setup journey.

GitHub App integration

If you use the Bitrise GitHub App to connect your Bitrise Workspace to a Git account or organization, you don't need a webhook. The app can trigger builds or send status updates without it.

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 App settings page 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:

  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 with a user that has the Admin role on the app.

  3. On the main page of the app, click on the App Settings icon: settings.svg.

    app-settings.png
  4. On the left, select Integrations.

  5. On the top of the Integrations page, select the Webhooks tab.

    webhooks-tab.png
  6. In the Incoming webhooks section, select 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.

  1. Open your app on Bitrise with a user that has the Admin role on the app.

  2. On the main page of the app, click on the App Settings icon: settings.svg.

    app-settings.png
  3. In the Incoming webhooks section, Set up webhooks manually.

  4. On the top of the Integrations page, select the Webhooks tab.

    webhooks-tab.png
  5. In the pop-up window, select your service from the dropdown menu.

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