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.

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 for automatically triggered builds only

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 addresses for the Bitrise website.

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:

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. In the upper right corner, open the account selector dropdown menu.

  2. Select the Account settings option.

    account-settings.png
  3. 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
  4. 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.

  5. Open your app on Bitrise.

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

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

  8. Find the Service credential user section.

    Reporting the build status to your Git hosting provider
  9. 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.

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. On the main page of the app, click on the App Settings icon: settings.svg.

    app-settings.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:

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. On the main page of the app, click on the App Settings icon: settings.svg.

    app-settings.png
  3. On the left, select General.

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

    apps-repository-url.png