Skip to main content
Version: Early Access

Bitbucket Plugin

This topic describes how to configure the Digital.ai Release Bitbucket plugin.

Prerequisites

  • Install the Bitbucket plugin into the XLR plugins/xlr-official folder.

Requirements

  • Bitbucket Cloud running and accessible.
  • Bitbucket Server running and accessible.
  • Digital.ai Release running and accessible.

Configuration

  • You need to have information about URL, username and password to connect with Bitbucket cloud and Bitbucket server.
  • Create a Connections for your Bitbucket Cloud and Bitbucket Server.
  • Create a Connections for your HTTP Endpoint For Webhooks.

Set up a connection to the Bitbucket Cloud

  1. From the navigation pane, click Configuration > Connections.
  2. Under configurations, beside Bitbucket: Cloud, click Add button
  3. In the Title field, enter a name for the configuration.
  4. In URL, enter the URL where the Bitbucket cloud is running.
  5. In Username, enter the Bitbucket cloud username.
  6. In Password, enter the Bitbucket cloud password.
  7. Click Test, to test the connection.
  8. Click Save, to save the configuration.

XLR_Bitbucket-cloud_CONNECTION

Set up a connection to the Bitbucket Server

  1. From the navigation pane, click Configuration > Connections.
  2. Under configurations, beside Bitbucket: Server, click Add button
  3. In the Title field, enter a name for the configuration.
  4. In URL, enter the URL where the Bitbucket server is running.
  5. In Username, enter the Bitbucket server username.
  6. In Password, enter the Bitbucket server password.
  7. Click Test, to test the connection.
  8. Click Save, to save the configuration.

XLR_Bitbucket-server_CONNECTION

Features

  • Bitbucket cloud commit trigger configuration - This trigger can be used to poll the Bitbucket cloud for triggering releases.

  • Bitbucket server commit trigger configuration - This trigger can be used to poll the Bitbucket server for triggering releases.

  • Create bitbucket cloud/server tasks.
    • Tasks of bitbucket cloud -

      • Bitbucket Cloud: Create Pull Request
      • Bitbucket Cloud: Merge Pull Request
      • Bitbucket Cloud: Wait for Pull Request
      • Bitbucket Cloud: Commit List
      • Bitbucket Cloud: Download Code
      • Bitbucket Cloud: Tag Release
    • Tasks of bitbucket server -

      • Bitbucket Server: Create Branch
      • Bitbucket Server: Delete Branch
      • Bitbucket Server: Create Pull Request
      • Bitbucket Server: Approve Pull Request
      • Bitbucket Server: Merge Pull Request
      • Bitbucket Server: Decline Pull Request
      • Bitbucket Server: Get Pull Request
      • Bitbucket Server: Wait For Merge
      • Bitbucket Server: Commit Query
      • Bitbucket Server: Download Code
      • Bitbucket Server: Tag Release
      • Bitbucket Server: Search File Content
      • Bitbucket Server: Check Branch Existence
      • Bitbucket Server: Get Branch Restrictions
  • Create webhooks event for the Bitbucket cloud/server.
  • Add Bitbucket cloud/server tiles on the release dashboard.

Set up a connection for Webhooks

  1. From the navigation pane, click Configuration > Connections.
  2. Under configurations, beside HTTP Endpoint For Webhooks under Webhooks and Events section, click Add button
  3. Select POST endpoint in the HTTP Endpoint for Webhooks field.
  4. Enabled checkbox should be enabled.
  5. In the Title field, enter a name for the configuration.
  6. In Endpoint path, enter the endpoint path.
  7. Select No authentication in Authentication Method field.
  8. Click Save, to save the configuration.

XLR_webhooks_cloud_CONNECTION XLR_webhooks_server_CONNECTION

Tile and Dashboard configuration for Bitbucket Cloud

There are four tiles in Bitbucket cloud:

  • Bitbucket Cloud Commits Summary
  • Bitbucket Cloud Contributions Summary
  • Bitbucket Cloud Merge Requests Summary
  • Bitbucket Cloud Commits Timeline
  1. From the navigation pane, click Reports.
  2. Select the dashboard where you want to add the new tile.
note

If you have not created a dashboard yet, you can do so by clicking the Add dashboard button in the top right of the screen.

  1. In the top right of the screen, click Configure dashboard.
  2. In the top right of the screen, click Add tiles.
  3. Hover over Bitbucket Cloud Commits Summary, and click Add.
  4. Click the Configure option present in the tile.
  5. In the Title field, enter a name for the tile.
  6. In the Bitbucket Cloud field, select the cloud configured.
  7. In the Repository Full name field, enter the name of the repository.
  8. In the Branch Name field, enter the name of branch from which data can be fetched.
  9. In the Tag Name field, enter the tag name.
  10. In the Results Limit field, enter the limit of list in numbers.
  11. Click Save.

You can configure for rest of the three tiles of the Bitbucket cloud using the same process described above.

Tile and Dashboard configuration for Bitbucket Server

There are four tiles in Bitbucket server:

  • Bitbucket Server Commits Summary
  • Bitbucket Server Contributions Summary
  • Bitbucket Server Merge Requests Summary
  • Bitbucket Server Commits Timeline
  1. From the navigation pane, click Reports.
  2. Select the dashboard where you want to add the new tile.
note

If you have not created a dashboard yet, you can do so by clicking the Add dashboard button in the top right of the screen.

  1. In the top right of the screen, click Configure dashboard.
  2. In the top right of the screen, click Add tiles.
  3. Hover over Bitbucket Server Commits Summary, and click Add.
  4. Click the Configure option present in the tile.
  5. In the Title field, enter a name for the tile.
  6. In the Bitbucket Server field, select the server configured.
  7. In the Project Name field, enter the project key.
  8. In the Project Slug field, enter the name of the repository.
  9. In the Branch Name field, enter the name of branch from which data can be fetched.
  10. In the Tag Name field, enter the tag name.
  11. In the Results Limit field, enter the limit of list in numbers.
  12. Click Save.

You can configure for rest of the three tiles of the Bitbucket server using the same process described above.

Report creation

  1. Click Reports.
  2. Go to Audit report.
  3. Click the Generate new report button.
  4. Select Time period.
  5. Click Add filter to generate the report for a specific template.
  6. Click the Preview results button.
  7. Click the Generate report button.
  8. Download the generated report.
  9. Extract it and verify the extracted reports.

Create Pull Request

This task creates a pull request from a source to the target branch. It is used to propose merging changes from one branch into another.

Merge Pull Request

This task merges a pull request. It is used to integrate changes from a pull request into the target branch after review and approval.

Wait for Pull Request

This task waits for a pull request to be merged. It is used to pause operations until the specified pull request has been merged.

Download Code

This task downloads the code for a given repository. It is used to retrieve the latest version of the codebase for development or analysis.

Commit List

This task commits a given list of files to the branch. It is used to save multiple changes to the repository in a single commit.

Decline Pull Request

This task declines a pull request. It is used to reject a pull request, preventing it from being merged into the target branch.

Get Pull Request

This task gets pull request details. It is used to retrieve information about a specific pull request, such as its status and changes.

Wait For Merge

This task waits for a pull request to be merged. It is used to pause operations until the specified pull request has been merged.

Tag Release

This task tags a release. It is used to create a tag in the repository, marking a specific point in the project history, often for a release.

Search File Content

This task searches for file content in a branch. It is used to locate specific content within the files of a given branch.

Delete Branch

This task deletes a branch. It is used to remove a branch from the repository, often after its changes have been merged.

Create Branch

This task creates a branch from a commit point. It is used to start a new line of development based on a specific commit.

Approve Pull Request

This task approves a pull request. It is used to indicate that a pull request has been reviewed and is ready for merging.

Commit Query

This task creates a commit query. It is used to search for specific commits based on criteria such as author, date, or commit message.

Clone Repository

This task clones a repository from Bitbucket. It is used to create a local copy of a Bitbucket repository for development or analysis.

Commit Files

This task commits a file to a Bitbucket repository. It is used to save changes to a file in the repository, typically with a commit message.