Skip to main content
Version: Release 23.1

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
    • 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
  • 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.