Important Note

Please read this documentation carefully to avoid configuration issues and unexpected behavior.

Overview

Bamboo plugin that provides support for AccuRev repositories use

Compatibility

 

Bamboo versions < 2.0

Bamboo Versions 2.0.x

Bamboo Versions >= 2.1

Plugin version 1.0

(error)

(tick)

(question)

Unknown macro: {roundrect}

= compatible
= not compatible
= compatibility unknown

Primary Features

Pligin provides the following major features:

  • Support for 2 operation modes: 'stream' and 'workspace' (see below)
  • Detect source code changes (date and time, user name, comment, affected files with versions) in streams and workspaces
  • Retrieve source code from repository for a build using existing workspace, stream or snapshot
  • Possibility to specify repository location (server name and port) and account to use to access it
  • Linux and Windows support

Additional Features

Optional Details in Change Comments

Plugin also has a feature to add useful information (optionally) to change comments:

  • Date and time when change was done
  • Stream/workspace where change has happened
  • Change type (keep, promote, etc.)
  • Stream change details if change is related to a streams configuration (re-parent, time lock change)

Bamboo Variables Support

Plugin defines several variables to be used other Build Plan configuration tabs:

  • Provide repository related information to Builders (use it to define some other Build Plan option using them)
  • Display repository configuration and source retrieval data used for the specific build on 'Meta Data' page
  • Remember to use that names like: ${bamboo.<variable>} as per the Bamboo manual and use single quotes to pass through variable values that may contain spaces.
    Eg:
    System Environment Variables:
    AC_PATH=${bamboo.repository.accurev.path.binary} 
    AC_CONFIG_TYPE=${bamboo.repository.accurev.config.type} 
    AC_REVISION='${bamboo.repository.accurev.revision}' 
    AC_CONFIG_NAME=${bamboo.repository.accurev.config.name} 
    

Operation Modes

AccuRev repository plugin supports 2 operation modes that have different repository setup requirements and can be used to serve different needs.

Mode

Overview

Pros

Cons

stream mode

In this mode plugin can check specific stream (including workspace backing stream) or snapshot for changes and populate sources from it.

  • Builds from streams, workspaces and snapshots are supported
  • There is no need to create special AccuRev configuration and build can be performed from any existing object (stream, workspace or snapshot) and all steps can be completed on Build Plan configuration page without a need to prepare repository for that
  • Build is not bound to any AccuRev predefined location
  • The same stream or snapshot can be used in multiple Build Plans
  • Workspace location is not affected by build and files in it doesn't affect the build (no unexpected issues for existing workspaces due to wrong setup)
  • Existing workspace can't be used 'as is', all sources will be populated to a different location according to versions defined by its backing stream
  • Build can't update repository (i.e. keep some build artifacts or update file content)
  • Build always works as 'clean' build since AccuRev 'pop' (populate) command is used with '-O' (overwrite) switch (i.e. all sources are overwritten with their timestamps updated which usually causes full rebuild)
  • A bit more complicated build failures analysis

workspace Mode

In this mode plugin works with existing workspace only and inside its location

  • Existing workspaces can be used with all modified and external files in there
  • Build failures are easier to reproduce and analyze
  • Build can update files in repository and/or keep required build artifacts there
  • A bit more complex to prepare setup
  • Workspace location has to be accessible by every build agent that can perform the build
  • Wrong setup and use can result in workspace update and lead to unexpected issues
  • The same workspace use in multiple Build Plans or in Build Plan and by developer will lead to unpredictable workspace state issue due to 'update' command use by plugin

History

Version

Date

Description

Download

1.0

March 18, 2009

Initial plugin release to open source

accurev-bamboo-1.0.jar

Installation

Setup

  1. Download required version of AccuRev repository plug-in
  2. Put plugin JAR into '$BAMBOO_HOME/webapp/WEB-INF/lib' directory
  3. Restart Bamboo Server
  4. Go to Bamboo Administration page and click System Information in System category
  5. Check that 'AccuRev Repository' plugin and its correct version are listed in Enabled Plugins section of the page (see below)

Configuration

AccuRev Client Location

Plugin uses AccuRev command line client to perform all its actions. By default it executes just 'accurev' binary without a full path assuming that it is the $PATH. If it is not the case AccuRev client install path has to be known to the plugin on server and/or every Build Agent.

AccuRev client location has to be specified as a custom Capability named 'accurev.path'

Server Configuration

Agent Configuration

  1. Go to Administration page
  2. Click on Server Capabilities in Build Resources section
  3. In Add Capability section chose Custom, enter Key value 'accurev.path' and AccuRev client installation path as a Value (base path only)
  4. Click Add button
  1. Go to Administration page
  2. Click on Agents in Build Resources section
  3. For every Agent that has to get sources from AccuRev View link and do remaining steps
  4. On Capabilities tab click on Add Custom
  5. On Add Capability screen Custom, enter Key value 'accurev.path' and AccuRev client installation path as a Value
  6. Click Add button

Plugin Meta Data Storage

Plugin implementation requires to store some additional data per build plan to overcome AccuRev limitation (1-10MB per build plan). This location has to be created before any build plan with AccuRev can be used and Bamboo Server needs to have read/write access to it. The location is used only in change detection phase so no Build Agent need to access it.

Usage

Create or edit a Build Plan

Create a new Build Plan, clone or edit an existing one. Switch to Source Repository tab for the Build Plan.

Select AccuRev as Source Repository

Check if AccuRev is selected as Repository on Source Repository tab and switch to it if it wasn't.

Edit Server Configuration options

When AccuRev is selected as Repository all its options becomes available to configure. Required fileds are marked with asterix.

Enter or modify AccuRev server options providing your server and login details:

  • Server Name (host name) and its Port where AccuRev instance is running and serving requests. It can be master or replica server.
  • Enter path to Meta Data Location where plugin will store some extra information required to properly detect changes (see for details).
  • User Name and Password to log into repository. Password field is displayed if Change Password is checked.

(info) Plugin will check if connection to AccuRev server can be made using host details and credential provided when changes are saved. It will also check if meta data location exists when configuration is saved.

Edit Repository Configuration options

In this section you have to specify configuration to check for changes and to retrieve sources. Based on your needs you have to chose operation mode and set options specific for it.

You have to choose required Mode and set other options as explained below.

Repository Configuration for Stream mode

For this mode just Stream/Snapshot name parameter has to be specified. It can be regular or workspace backing stream or snapshot name.

(info) Plugin will check if existing stream or snapshot name was provided.

Plugin will collect changes in the specified stream and all parent streams in its hierarchy using 'stat' and 'hist' AccuRev commands. Source code is retrieved using 'pop' command into Build Plan working directory.

Repository Configuration for Workspace mode

In 'workspace' mode configuration Workspace/Reftree name has to be entered.

(info) Plugin will check if existing stream or snapshot name was provided.

Reference Trees Support

Reference trees are not supported yet. Consider opening enhancement request if it's required.

Plugin will check all streams in the workspace hierarchy starting workspace backing stream for recent changes. Algorithm is implemented in the way to avoid workspace update at this stage but get all recent changes.

In this mode workspace location has to be used for build and it is being updated by plugin to bring all recent changes. Plugin uses 'update' command for this. It might be useful to disable such updates using Disable Update option to

  • Allow debug and fix build failures using manual build in workspace location
  • Control workspace updates manually if it is being used in Build Plan and by developer

Development

Jira Issues

type key summary reporter status assignee

Data cannot be retrieved due to an unexpected error.

View these issues in Jira