Bamboo 3.4 : Bitbucket - Mercurial

The instructions on this page describe how to configure a Bitbucket Mercurial source repository for either a Plan or a Job.

Configuring a Bitbucket Mercurial Source Repository

Navigate to the source repository settings for a Plan or Job, as described on Specifying the Source Repository for a Plan. Choose to add a new or edit an existing repository. 

Once you've added your Bitbucket username and password, you will have the following options to specify the source repository for your plan

RepositoryMy RepositoriesRetrieves all repositories you have explicit permissions to from Bitbucket once you click Load Repositories.
URLSelect URL if you want to manually specify a repository URL (eg. http://bitbucket.org/sindbad/ogre). If you want to choose a branch to work on, other than the default branch, click Load Branches and select the desired branch.
BranchesPick a branch if you want to checkout code from a branch other than the default branch.

Advanced Options

Command timeoutType the number of minutes bamboo should wait for Bitbucket commands to finish. This is useful to cut hung Bitbucket processes. On the slower networks, you may consider increasing the default timeout to allow Bamboo to make an initial clone of mercurial repository.
Verbose logsTurns on --verbose and --debug options in hg commands and passes the output to build logs. Use that option if you encounter problems Mercurial in Bamboo.


Common Repository Configuration

Force Clean BuildYou can force Bamboo to remove the source directory and check it out again prior to the Plan/Job build being built by selecting this option. Please note that this will greatly increase the time it takes to complete a build.
Clean working directory after each buildYou can force Bamboo to remove the source directory after the Plan/Job is completed building by selecting this option. Please note that this may increase build times but saves on disk space.
Include/Exclude FilesYou can specify a particular inclusion or exclusion pattern for file changes to be detected. If you select an option other than 'None', the following field will appear:

File Pattern — The regular expression for file changes which you wish to include/exclude. The regex pattern must match the file path in the repository.

Visit sub page for a few examples.

Web Repository

Generic Web Repository

Web Repository URL — If your source repository can be accessed via a web browser, you can specify the URL of the source repository here. If you specify a Web Repository URL, then links to relevant files will be displayed in the 'Code Changes' section of a build result.

Web Repository Module — The repository name of the Plan/Job, if the above Web Repository URL points to multiple repositories.

Mercurial Web RepositoryChoose between using the BitBucket Web Repository Scheme (if you use BitBucket) or Mercurial's own default web server Default Web Repository Scheme (hgserve).
FishEye

FishEye URL — The URL of your FishEye repository (e.g. 'https://atlaseye.atlassian.com/').

Repository Name — The name of your FishEye repository (e.g. 'Bamboo'). This is effectively the alias for your repository path.

Repository Path — The path for your FishEye repository (e.g. '/atlassian/bamboo/').

How do I determine my Repository Path?

If you have previously run builds with changes from your repository, the easiest way of determining your repository path is to view the code changes and copy the path from the start of the path of one of the changed files, up to (but not including) the appropriate root directory. The root directories for repositories are the ones shown by FishEye when browsing a repository (e.g. trunk)). For example, if a code change listed /atlassian/bamboo/trunk/bamboo-acceptance-test/pom.xml, the path would be /atlassian/bamboo/.
If you have not previously run builds with changes from your repository, you will need to ask your FishEye administrator for the repository path indexed by FishEye.

 
Build Strategy

Choose one of the build strategy options (listed below), which will be used for triggering the execution of this Plan. You can change the Build Strategy at a later point in time as required.

(warning) You may need to configure other options specific to your chosen build strategy.

(warning) If you select Manual & dependent builds only when creating a new Plan, an initial build will not automatically be run. You can force an initial build to be executed automatically by adding the fire.initial.build.for.manual.strategy to your bamboo.cfg.xml file as described in Configuring System Properties.


 

Screenshot above: Source Repository — Bitbucket

Notes

  • The page Configuring a new Mercurial capability does not exist. You will not be able to create Plans/Jobs that use a Bitbucket Mercurial repository without specifying the shared local Mercurial capability first. Read more about configuring a Version Control capability.
Related Topics

Specifying the Source Repository for a Plan
Specifying the Source Repository for a Job