This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

The instructions on this page describe how to configure a Subversion source repository.

On this page:

Configuring a Subversion 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 and select Subversion in the Source Control drop-down. 

Subversion gives you the following options:

Repository URL

The location of your Subversion repository (e.g.http://svn.collab.net/repos/svn/trunk)

(info) Note that you can use global variables in this field (see Using Global or Build-specific Variables).

(info) If you are importing a Maven 2 Project, this location should contain your project's pom.xml file.

Authentication TypePasswordChoose this option if you want to authenticate with a username and password.
SSH

If you choose to authenticate via SSH, you will have to provide the following details:

Private Key — The absolute path of your SSH private key
Passphrase — The passphrase for your SSH private key

(info) You need to configure the path of the private key located in Bamboo server. This will be used by Bamboo server (for change detections) and by local agents.

(info) If you are planning to use remote agents, the ssh private key file has to be copied to the agent box into manually (you might want to use the default location ~/.ssh).

(info) Bamboo server sends only the URL of the SVN repository to the remote agent (no public/private key is being sent to the remote agent).

SSL Client Certificate

If you choose to authenticate via SSH, you will have to provide the following details:

Private Key — The absolute path of your SSL client certificate
Passphrase — The passphrase for your SSL client certificate

(info) Please note, the client certificate has to be in PKCS12 format and the client certificate file must be passphrase protected, otherwise a runtime exception is thrown by JDK security engine while opening the user key.

Advanced Options

Quiet Period

Quiet Period — This field will only display if 'Enable Quiet Period:' has been selected. This setting is used to avoid starting a build while someone is in mid-checkin. Bamboo will only initiate a build for this Plan when no more changes are detected within the Quiet Period following the last known change. Type the number of seconds Bamboo should wait.

Maximum Retries — You can specify how many times Bamboo should check for new changes using the Quiet Period parameter before initiating a build. For example, if you have set the 'Quiet Period' to '10' seconds then Bamboo will check if a checkout has occurred in the last 10 seconds. If you have then specified 'Maximum Retries:' as '5', then Bamboo will perform this check five times before initiating the build, regardless of any activity during the Quiet Period of the last check.

 (Only available when configuring an existing Plan) 

Detect Changes in Externals

Select this check box if your Subversion repository uses svn:externals to link to other repositories (note that your externals must be in the root of the checkout directory, not in a subdirectory). Please note that you only need to select this check box if you require Bamboo to detect changes in the externals. If your externals references a particular (static) revision, you do not need to check this box.

 

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 — SVN

Notes

  • If you are having problems connecting to Subversion, consult our documentation on troubleshooting Subversion connections.
  • If you use pre-1.5 Subversion client to access code checked out by Bamboo, you may encounter problems with your builds. This is due to the SVNKit upgrade in Bamboo 2.1.4. Please read this knowledge base article for further details.
Related Topics

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

14 Comments

  1. MattS

    An example of a URL with a space in it would be good too.

    E.g. http://svn.collab.net/repos/svn/trunk/directory%20with%20spaces

  2. Anonymous

    *Is it possible to specify more than one Repository URL? E.g., *http://abc/src/svn/unit1 and http://abc/src/svn/shared are both required to make a build.

    1. Anonymous

      Any news on using multiple repository urls for product build?

      1. Anonymous

        Yeah.  That would be great.

  3. Anonymous

    The "Include /Exclude Files" option checks only file names, or absolute path, or path relative to working directory?

  4. Anonymous

    Is it possible for a plan to share the same subversion checkout as another plan?. I need to perform extra operations in a generated ear file by a previous plan and it would be good to have access to those files.

  5. Terris Linenbach

    Desperately seeking example of an "exclude" or "include" regular expression. I'm a programmer and I know what a regex is, but I have no idea what Bamboo is trying to match it against.

    Let's cut to the chase. The file is something like http://foo/blank/trunk/harness/etc/env/info.pm . What is the regex?

    1. Sam Kenny

      I raised this with Atlassian Support.  This is the reply from Renan which works for me:

      This field uses Java Regex. An example would be the following:

      .*/src/.*|.*\.txt
      

      That would exclude files located ate a path containing "/src/" or ending with ".txt".
      To exclude ".txt" files you can use:

      .*\.txt
      
  6. John Harelius

    In Bamboo 2.6 I could omit the username and password for accessing Subversion, and then the user running the Bamboo service was used. This was very convenient since you didn't need to bother about username and password for accessing Subversion when creating plans.

    I can't get this to work using Bamboo 2.7 though, have there been a change in the way subversion is accessed in Bamboo 2.7?

  7. Anonymous

    For subversion SSH authentication the private key file must be in OpenSSH format.

    I run in windows and sa was trying to use a putty format key file (.ppk extension) and the error message wasn't very helpful. Fortunately the puttygen tool has the ability to save a key in OpenSSH format in "Conversions->Export OpenSSH key".

  8. David Corley

    Does the include/exclude option only prevent that path from being checked for changes as part of build triggering, or does it also actually prevent any files from the path being checked out?

  9. David Corley

    Bamboo 3.4.x doesn't appear to allow you to check out a repository to a parent path of the working directory.

    This wasn't the case in Bamboo 3.3.x, and there doesn't appear to be any mention of it in the release notes, the documentation, or the list if issues fixed. We had a particular use case that depended on that ability. Why did Atlassian remove it?

    1. James Dumay

      How were you checking out a svn repository outside of the working directory? Using a relative path?

      1. David Corley

        Hey James, 

        Yes, our checkout path looked something like "../altdir". This worked fine in Bamboo 3.3.3, but 3.4.4 explicitly disallows it with an error in the UI