Configure source code management

5 minute read

Connect source code management (SCM) systems to CloudBees Unify to enable repository discovery, webhook configuration, and authenticated repository access during workflow execution. You can integrate with cloud-hosted SCMs (GitHub, Bitbucket Cloud, GitLab Cloud) and self-managed instances (Bitbucket Data Center, GitLab self-managed, Gerrit).

Each SCM integration type uses its own authentication method: GitHub uses GitHub App (managed by CloudBees Unify), GitLab and Bitbucket use personal access tokens, and Gerrit uses basic authentication.

Each SCM integration type requires specific repository or application permissions to enable workflow commits and webhook creation. For detailed requirements, refer to SCM permissions reference.

SCM integration types

The following SCM providers are supported with their respective authentication methods:

Table 1. SCM integration types available in CloudBees Unify
SCM provider Hosting Integration type

Cloud

Access token

Self-hosted

Access token

Cloud

GitHub App

Cloud or self-managed

Access token

Self-hosted

Basic authentication

Configure GitHub integration

CloudBees Unify connects to GitHub through a GitHub App that is registered and managed by CloudBees.

To integrate your GitHub repository:

  1. Navigate to Configurations  Integrations.

  2. Select Create integration. The list of available integration types is displayed.

    You can locate an integration type three different ways: scroll through the alphabetical list grouped by category, use the search bar to search by name, or use the options to filter by category. If the integration type is not listed, hover over the Category menu to redisplay the integration category list and select another category.
  3. Select GitHub App from the list of available integration types. The Create integration form opens.

  4. Enter an integration Name (no spaces are allowed).

  5. (Optional) Enter a Description.

  6. Select Install GitHub App. This action redirects you to GitHub.

  7. Select a GitHub account or GitHub organization to connect.

    You can only set up a single CloudBees Unify integration with a given GitHub account or organization. GitHub accounts and organizations are displayed as follows: Configure present indicates at least one repository is already connected to CloudBees Unify; Configure not present indicates the account is available to connect to CloudBees Unify. The integration name is automatically generated based on the GitHub organization name.
  8. Install and authorize All repositories, or Only select repositories, and select from the options.

  9. Select Install & Authorize.

Your GitHub account is now connected to CloudBees Unify and appears in Configurations  Integrations.

Manage GitHub App permissions

New features in CloudBees Unify may sometimes require updates to permissions in the GitHub App registered by CloudBees. If CloudBees Unify requires a permissions update, all users of the GitHub App receive an email notification from GitHub and can access the permissions change request in their Installed GitHub applications listing.

To update GitHub App permissions when requested:

  1. Go to your list of installed GitHub Apps, and select Review request next to CloudBees Unify.

  2. Review the Developer note describing why this change is necessary.

  3. Select Accept new permissions.

The CloudBees Unify GitHub App permissions are updated to enable full functionality for the new platform feature.

If you choose not to accept the new permissions, your existing permissions are retained, and you will not be able to use the new platform feature.

Configure Bitbucket Cloud integration

Use an access token to connect your Atlassian Bitbucket Cloud repository to CloudBees Unify. Bitbucket Cloud supports three token types (workspace, project, and repository) with different scope coverage and plan requirements. Refer to Bitbucket access tokens reference for guidance on selecting the right token type.

To integrate with Bitbucket Cloud:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration. The list of available integration types is displayed.

  3. Select Bitbucket access token from the list of available integration types.

  4. Enter an integration Name (no spaces are allowed).

  5. (Optional) Enter a Description.

  6. Enter your Token.

    CloudBees Unify requires only the following scopes from Bitbucket: Repositories (Read and write), Pull requests (Read and write), Webhooks (Read and write).
  7. (Optional) Select Test integration to check the connection.

  8. Select Submit.

Your Bitbucket account is now connected to CloudBees Unify and appears in Configurations  Integrations.

Configure Bitbucket Data Center integration

Connect your on-premises Atlassian Bitbucket Data Center repository to CloudBees Unify using an access token.

To integrate with Bitbucket Data Center:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration. The list of available integration types is displayed.

  3. Select Bitbucket Data Center access token from the list of available integration types.

  4. Enter an integration Name (no spaces are allowed).

  5. (Optional) Enter a Description.

  6. Enter your Bitbucket Data Center URL.

  7. Enter your Token.

    CloudBees Unify requires Repository admin permissions from Bitbucket Data Center. Refer to the Bitbucket Data Center HTTP access token documentation for more information.
  8. (Optional) Select Test integration to check the connection.

  9. Select Submit.

Your Bitbucket Data Center account is now connected to CloudBees Unify and appears in Configurations  Integrations.

Configure GitLab integration

Connect your GitLab repository to CloudBees Unify using a personal access token. The integration supports both GitLab Cloud (gitlab.com) and self-managed GitLab instances.

To integrate with GitLab:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration.

  3. Select .

  4. Select Category  Source code management.

  5. Select GitLab access token.

  6. Enter an integration Name (no spaces are allowed).

  7. (Optional) Enter a Description.

  8. If you use a self-managed GitLab instance, enter the full GitLab URL.

  9. Enter your GitLab personal access token.

    CloudBees Unify requires a personal access token with the api scope, which grants complete read/write access to the API, including all groups, projects, and repositories. Project-level access tokens are not supported.
  10. (Optional) Select Test integration to verify the connection.

  11. Select Submit.

Your GitLab account is now connected to CloudBees Unify and appears in Configurations  Integrations.

Create GitLab personal access token

To create a personal access token in GitLab:

  1. In GitLab, navigate to User Settings  Access tokens.

  2. Enter a Token name and (optional) Description.

  3. Set an Expiration date.

  4. Select the api scope.

  5. Select Create personal access token.

Configure Gerrit integration

Connect your self-hosted Gerrit Code Review system to CloudBees Unify using basic authentication.

To integrate with Gerrit:

  1. Select an organization, and then select Configurations  Integrations.

  2. Select Create integration.

  3. Select .

  4. Select Category  Source code management.

  5. Select Gerrit Code Review Credentials.

  6. Enter an integration Name (no spaces are allowed).

  7. (Optional) Enter a Description.

  8. Enter your organization Gerrit instance URL in Gerrit Code Review URL.

  9. Enter the Username.

  10. Enter the Password.

Your Gerrit SCM account is now connected to CloudBees Unify and appears in Configurations  Integrations.

Next steps

Once your source code is connected to CloudBees Unify, you can create new components or applications and set up workflows.

Feature flag code references currently supports GitHub repositories only. Bitbucket, GitLab, and Gerrit integrations do not support code references at this time.

For more information, refer to the following documentation: