Plug-in Documentation

BitBucket Server

Overview

Overview

The BitBucket Server plug-in provides for integration with a BitBucket server.

Compatibility

Must be running UrbanCode Velocity version 1.2.1 and later to use the plug-in.

Versions

There is no install process for this plug-in. The BitBucket Server plug-in is identified to UrbanCode Velocity as a value stream integration. UrbanCode Velocity plug-in images are located in DockerHub and the UrbanCode Velolcity code accesses the version that you select. To view available versions, see the UrbanCode DockerHub.

History

Version 1.0.19

  • Update plugin version from 0.x.x to 1.x.x format.

Version 0.0.14

  • Switch build target on Jenkinsfile.
  • Fix problem when history is empty.

Version 0.0.13

  • Update to api-client 1.0.11.

Version 0.0

Usage

To use the BitBucket Server plug-in you must define the integration, create a value stream, and upload the integration.

The value stream map contains the properties, you will use to define the plug-in integration. Basically, the plug-in integration is defined with a value stream within the UrbanCode Velocity user interface. Defining the integration includes defining configuration properties that connect the UrbanCode Velocity server to the BitBucket server.

The basic flow to use the plug-in includes:

  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 Integration user interface page.

Integration type

The BitBucket Server plug-in supports scheduled events integration which are listed in the following table.

Scheduled events
Name Description
syncBitBucketServerPullRequestsEvent Queries the BitBucket Server for pull requests in a project.
syncBitBucketServerCommitsEvent Queries the BitBucket Server for commits in a project.

Integration

From the user interface Value Steam page, click Upload to upload the value stream map which is 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 UrbanCode Velocity value stream map.

Value stream map information
Name Description Required
image The version of the plug-in that you want to use. To view available versions, see the UrbanCode DockerHub. If a value is not specified, the latest version is used. No
name An assigned name to the value stream. Yes
loggingLevel The level of Log4j messages to display in the log file. Valid values are: all, debug, info, warn, error, fatal, off, and trace. No
properties List of configuration properties used to connect and communicate with the BitBucket server. Enclose the properties within braces. Yes
tenant_id The name of the tenant. Yes
type Unique identifier assigned to the plug-in. The value for the BitBucket Server plug-in is ucv-ext-bitbucket-server Yes

Configuration Properties

The configuration properties which are included in the properties field are unique to the BitBucket Server plug-in and define the connection and communication to the BitBucket server.

Configuration properties
Name Type Description Required Property Name
Access Token String The access token for oauth authentication. No access_token
Access Token Secret Secure The access token secret for oauth authentication. No access_token_secret
API URL String The URL to the API. Yes baseApiUrl
Consumer Key String The consumer key for oauth authentication. No consumer_key
Consumer Secret Secure The consumer secret for oauth authentication. No consumer_secret
Password Secure The password associated with the user name to authenticate with the BitBucket server. Yes password
Project Key String The repository project key. Yes projectKey
Project Name String The name of the project which contains one or more repositories. Yes projectName
Repository Name String The name of the repository. Yes repositoryName
Repository Slug String The slug of the repository. Yes repositorySlug
Signature Method String The name of the signature method for oauth authentication. No signature_method
User Name String The user name used to authenticate with the Bitbucket server. No username

Example

The following example can be used as as template to include the BitBucket Server plug-in integration into the JSON file. Copy and paste the template into the JSON file and make the appropriate changes.


{ 
     "type": "ucv-ext-bitbucket-server", 
      "tenant_id": "5ade13625558f2c6688d15ce", 
      "name": "my-bitbucket", 
      "loggingLevel": "info",
      "disabled": false, 
      "properties": { 
        "baseApiUrl": "[Base URL ex: http://10.134.116.110:7990/rest/api/1.0]", 
        "username": "admin", 
        "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]" 
      } 
    }