Skip to main content

Reporting the build status to your Git hosting provider

Abstract

You need to authenticate Bitrise and specify a Service credential user in the App settings page of your app to push back build status reports to your Git provider.

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 any additional configuration described in the guide: the app automatically provides status reports.

Bitrise can push back build status reports to your Git provider (GitHub/GitLab/Bitbucket). You only need to authenticate Bitrise to communicate towards the Git hosting service. Apart from build status reports, this enables other operations, such as auto-registering SSH keys or webhooks. Status reports are sent only for automatically triggered builds, such as builds triggered by a code push or a pull request.

To do this, you need to specify a Service credential user of your app on bitrise.io. You also need to make sure that this user has a connected account with the Git hosting service of your choice on bitrise.io. This account will be used by Bitrise to communicate with the API of the Git hosting provider.

Configuring build status reporting

Allowlist the Bitrise website IP addresses

If you use some form of self-hosted solution for storing your code, you might need to allowlist the static IP addresses of the Bitrise website and its background workers. This allows you to use such features as storing the bitrise.yml file in your own repository, or receiving build status updates from Bitrise: IP address ranges for Bitrise backend workers.

To report your status, you need to make sure that the service credential user's Bitrise account is connected to their Git provider account. This Git account must have access to the app's repository.

Service credential user restriction

You can only set yourself as the service credential user and to do so, you need to have an Admin role on the app's team on Bitrise.

If the service credential user should be a specific Bitrise user, that user must log in and set themselves. For more information, see: Changing the service credential user.

To check that build status reporting is possible:

  1. Log in to Bitrise, and select Bitrise CI from the left navigation menu.

  2. In the upper right corner, click the profile image to open the dropdown menu.

  3. Select the Account settings option.

    account-settings.png
  4. Make sure your account is connected to the Git provider that hosts the repository: check the CONNECTED ACCOUNTS menu on the left side.

    Reporting the build status to your Git hosting provider
  5. Make sure the connected Git provider account has the required level of permission for sending status reports.

    • On GitHub and Bitbucket, Write access is required.

    • On GitLab, Developer access is required.

  6. Open your project on Bitrise with a user that has the Admin role on the project.

  7. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  8. On the left, select Integrations.

  9. Find the Service credential user section.

    Reporting the build status to your Git hosting provider
  10. Click the Test <Git provider> connection button to make sure the selected user’s connection can be used for sending back the build status to the hosting provider.

Troubleshooting build status reporting

If your builds do not send status reports to your Git hosting provider - GitHub, GitLab or Bitbucket -, you will need to do a little investigating to find out what causes the problem. Let’s take a look at the potential issues!

Checking the service credential user

The service credential user of the app on bitrise.io must have connected their Bitrise account to their Git hosting account and must have access to the repository of the app on that Git account.

You can check the service credential user and test their Git connection.

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

  2. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  3. Go to your app’s page on bitrise.io.

  4. Find the Service credential user section.

    service-credential-user.png

    Current user

    In the figure, the current active user is the service credential user. If the service credential user is a different user, this looks a little different, including the button's text.

  5. Click the Test <Git provider> connection button to test the user's Git connection.

Checking repository permissions and repository URL

Make sure that you granted Bitrise access to your Workspace or team. It might be that you did not grant Bitrise access or denied access to the GitHub Workspace or Bitbucket team that owns the repository.

Make sure the URL repository is up to date:

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

  2. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  3. On the left, select General.

  4. Find the repository URL and make sure it's correct.

    apps-repository-url.png