Wiki

Clone wiki

Rally for Bitbucket / Home

Rally Connector for Bitbucket

Rally Connector for Bitbucket is a Bitbucket plugin that allows teams to integrate a Bitbucket repositories with Rally projects.

Installation

Installing Rally Connector for Bitbucket

To install Rally Connector for Bitbucket, log into your Bitbucket Server as Administrator and install Rally Connector directly from Atlassian Marketplace or by file upload. To check whether Rally Connector is compatible with your Bitbucket Server version, please, visit Atlassian Marketplace.

Once Rally Connector is installed, you'll able to see the Rally Connector tab on the left-side navigation bar on each repository setup page in Bitbucket Server.

Configuration

Configuring Rally Connector for Bitbucket

Rally Connector for Bitbucket has three configuration levels:

Configuration at Server Level

Allows administrator users to configure default values to be applied across all Bitbucket repositories.

Access for the Server configurations:

  1. Go to Administration Panel
  2. Click Rally Connector on the let-side navigation bar

Admin.png

Configuration at Repository Level

  1. Go to Repository
  2. Click Settings on the left-side navigation bar
  3. Click Rally Connector

Repository.png

Configuration at Bitbucket User Level

  1. Click your profile picture in the top right corner of the screen
  2. Choose Manage Account
  3. Click Rally Connector on the left-side navigation bar

User.png

Rally Setup

Check if your target WorkspaceConfiguration has BuildandChangsetEnabled set. Your Rally workspace administrator needs to enable this for your target workspace. If it is not enabled, the connector will work, but you won't be able to see any of the changeset or change information that is associated with your Rally work items (story, defect, task).

Create a Rally API key

A Rally API Key must be created to use to access your subscription data without using your username and password.

NOTE: Make sure to give Full Access for your Rally API Key

RallyKeys.png

For help creating a full-access API Key, please visit http://help.rallydev.com/rally-application-manager.

Bitbucket Setup

After install Rally Connector for Bitbucket, go to your repository commit list and see a new column that contains Rally artifacts present in the commit message. You can disable this feature in the repository settings, under Rally Connector settings.

Go to User Account Settings and put your Rally API Key under Rally Connector tab. After that, you will be able to validate your Git commit messages during Bitbucket pushes and automatically associate commits changes from Bitbucket with Rally artifacts.

This way, you can configure one Rally API Key per Bitbucket user or configure just one Rally API Key per Bitbucket repository.

Features

  • Check whether commit messages contains a valid Rally artifact associated;
  • See the associated artifact in the repository commit history;
  • Reject pushes that not contains a valid Rally artifact;
  • Update Rally artifact changeset containing all changes pushed to Bitbucket;
  • Ensure that the Rally task is In-Progress state when pushing changes in Bitbucket;
  • Configuration at Server, Repository and User level.

Screenshots

Available screenshots here.

Feture Free Commercial
Enable Commit Tracking x x
Push Validation (Message Policy) x x
Push Validation (Rally Policy) x x
Push Validation (Restricted Policy) x
Push Validation (Validate In-Progress Status) x
Post Changeset x

Pre Hook

Rally Connector integration allows you to reject commits to a repository based on configurable rules. Its main feature is requiring commit messages to contain a valid Rally artifact, and optionally requiring Rally artifact owner to match with a Bitbucket commiter.

Post Hook

Rally Connector integration creates changeset information in Rally associated with the workspace and SCMRepository of your choice. In Rally, when looking at an artifact, you can see detail on changesets associated with commits from Bitbucket push activities.

The integration scans for tokens in the commit message that conform to a Rally artifact's FormattedID format. These tokens are validated against Rally so that a reference to a valid Rally artifact (user story, defect, task) results in the association of the artifact to the changeset posted in Rally performed by this integration.

Troubleshooting

All plugin logs are placed in the <Bitbucket home directory>/log/atlassian-bitbucket.log, you can change the log level at runtime, without restart the Bitbucket instance.

#!bash
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/bitbucket/rest/api/latest/logs/logger/com.pluginsawesome/debug

After change Rally Connector logs to debug you can view something like this in the logs:

#!bash
2015-06-29 02:04:37,687 DEBUG [threadpool:thread-2] admin 124x9x0 j02m7r 0:0:0:0:0:0:0:1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.p.s.p.h.RallyPreReceiveRepositoryHook Starting pre receive validation...

More information available at https://confluence.atlassian.com/display/STASH/Stash+debug+logging#Stashdebuglogging-Enablingdebugloggingatruntime

Updated