Skip to content

BitBucket Cloud - Usage

To use the BitBucket Cloud plug-in, the plug-in must be loaded and an instance created before you can configure the plug-in integration. You define configuration properties in the user interface or in a JSON file.

Integration type

The BitBucket Cloud plug-in supports scheduled events integration which is listed in the following table.

Scheduled Events

NameDescription
syncBitbucketPullRequestsEventQueries the BitBucket Cloud for pull requests in a project.
syncBitbucketCommitsEventQueries the BitBucket Cloud for commits in a project.

Integration

There are two methods to integrate the plug-in:

  • Using the user interface
  • Using a JSON file

For details, see Using plug-ins in DevOps Velocity.

Using the user interface

  1. From the Plugins page, click Settings > Integrations > Plugins.
  2. Under the Action column for the plug-in, click Add Integration.
  3. On the Add Integration page enter values for the fields used to configure the integration and define communication.
  4. Click Save.

Using a JSON file

The JSON file contains the information for creating a value stream and integrating with the BitBucket server. The following table describes the information for the creating a DevOps Velocity value stream map.

  1. Download the value stream map. The value stream map is a JSON file used to define integrations.
  2. Edit the JSON file to include the plug-in configuration properties.
  3. Save and upload the JSON file. This replaces the current JSON file with the new content.
  4. View the new integration on the Integrations page.

Configuration properties

The following tables describe the properties used to configure the integration. Each table contains the field name when using the user interface and the property name when using a JSON file.

  • The General Configuration Properties table describes configuration properties used by all plug-in integrations.
  • The Bitbucket Configuration Properties table describes the BitBucket configuration properties that define the connection and communications with the BitBucket server. When using the JSON method to integrate the plug-in these properties are coded within the properties configuration property.

Some properties might not be displayed in the user interface, to see all properties enable the Show Hidden Properties field.

Note: Previously email ID and password (Those which are used to log into the BitBucket Cloud website) were used in the field of Username and Password respectively. Now from version 1.0.16 Username(https://bitbucket.org/account/settings/) and App-password(https://bitbucket.org/account/settings/app-passwords/) will be used in the field of Username and Password to authenticate with the BitBucket Cloud.

General configuration properties

NameDescriptionRequiredProperty Name
Integration NameAn assigned name to the value stream.Yesname
Logging LevelThe level of Log4j messages to display in the log file. Valid values are: all, debug, info, warn, error, fatal, off, and trace.NologgingLevel
propertiesList of plug-in configuration properties used to connect and communicate with the Bitbucket Cloud. Enclose the properties within braces.Yesproperties
Tenant idThe name of the tenant.Yestenant_id
TypeUnique identifier assigned to the plug-in. The value for the Bitbucket Cloud plug-in is ucv-ext-bitbucket-cloudYestype

Bitbucket Cloud properties

NameTypeDescriptionRequiredProperty Name
User Access KeySecureThe access token secret for oauth authentication.YesucvAccessKey
UsernameStringThe user name used to authenticate with the Bitbucket cloud instance.You can find it here https://bitbucket.org/account/settings/Yesconsumer_secret
App PasswordSecureThe App password used to authenticate with the Bitbucket cloud instance.You can create one here https://bitbucket.org/account/settings/app-passwords/Yespassword
Project KeyStringThe repository project key.YesprojectKey
Project NameStringThe name of the project which contains one or more repositories.YesprojectName
Repository NameArrayThe comma separated name of the repositoriesYesrepositoryName
API LimitsStringMaximum API calls that the plugin will make in a single run.NoapiLimits
Branch NameStringThe branch to pull changes from.NobranchName
Additional BranchesArrayComma seperated names of additional branches to collect commits from besides the main one, leave blank if not needed.NootherBranches
Proxy PasswordSecureThe password used to authenticate with the proxy server.NoproxyPassword
Proxy ServerStringThe URL of the proxy server including the port number. The URL protocol can be http or https.NoproxyServer
Proxy User NameStringThe user name used to authenticate with the proxy server.NoproxyUsername

JSON code example

The following example can be used as a template to define the integration within the JSON file for a value stream. Copy and paste the template into the JSON file and make the appropriate changes.

{ 
     "type": "ucv-ext-bitbucket-cloud", 
      "tenant_id": "5ade13625558f2c6688d15ce", 
      "name": "my-bitbucket", 
      "loggingLevel": "info",
      "disabled": false, 
      "properties": { 
        "baseApiUrl": "[Base URL ex: https://bitbucket.org/api/2.0]", 
        "username": "[Basic User Name]", 
        "password": "[Basic user password]", 
        "projectName": "[Full project name ex: JKE Mortgage Application]", 
        "projectKey": "[Project key ex: JMA]", 
        "repositoryName": "[app repository name ex: web-application]", 
        "repositorySlug": "[app repository name ex: web-application]" 
      } 
    }