AccuRev Plugin

Skip to end of metadata
Go to start of metadata

This plugin allows you to use AccuRev as a SCM.

Plugin Information

Plugin ID accurev Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.6.33 (archives)
Jul 09, 2015
1.525
Source Code
Issue Tracking
Pull Requests
Maintainer(s)
GitHub
Open Issues
Pull Requests
Scott Tatum (id: statler)
Clint Martin (id: helterscelter)
Usage Installations 2014-Jul 340
2014-Aug 345
2014-Sep 332
2014-Oct 327
2014-Nov 336
2014-Dec 325
2015-Jan 342
2015-Feb 354
2015-Mar 398
2015-Apr 372
2015-May 361
2015-Jun 358

Installing the AccuRev Plug-In for Jenkins

If this is the first time you have installed the AccuRev Plug-In for Jenkins, use the following procedure. (If you have installed this plugin before, go to the “Upgrading the AccuRev Plug-In for Jenkins” section below.)

To install the AccuRev Plug-In for Jenkins:

  1. Select Manage Jenkins from the main menu, then select Manage Plugins from the options presented:
  2. On the Jenkins Plugin Manager page, select the Available tab, select the AccuRev Plugin, and click the Install without restart button.

Upgrading the AccuRev Plug-In for Jenkins

If you have previously installed the AccuRev Plug-In for Jenkins, take the following steps to upgrade to a newer version:

  1. In Jenkins, select Manage Jenkins from the main menu, then select Manage Plugins from the options presented.
  2. On the Plugin Manager page, select the Updates tab, select the AccuRev Plugin, and click the Download now and install after restart button.

Configuring the AccuRev Plug-In for Jenkins

After installing the AccuRev Plug-In for Jenkins, configure the AccuRev Server settings as described in the following section.

Configuring the AccuRev Server Settings

To configure the AccuRev server settings:

  1. Select Manage Jenkins from the main menu, then select Configure System from the options presented:
  2. Scroll down to the AccuRev section of the configuration page:
  3. Fill in each of the settings:
    • Name – a descriptive name for this entry. When you configure a new build, this name appears in the server drop-down for AccuRev.
    • Host – the host/IP of the AccuRev server. If you're not sure what this is, you can select Info from the Tools menu to view this information.
    • Username – your AccuRev user ID.
    • Password – the password for your AccuRev user ID.
    • Port – port of the AccuRev server connection. By default, the port number is 5050.
    • Poll on master – if AccuRev client on the master should be used for polling for changes
  4. If you want to add the settings for another AccuRev server , click Add. To delete the settings for an AccuRev server, click Delete.
  5. To save your changes, scroll to the bottom of the configuration page and click Save.

Configuring a build to use AccuRev

Once you have configured the AccuRev server settings, new builds can choose it for pulling down code. Create a new build, give it a job name, select the type of build, and click OK. On the subsequent screen, you'll see a section called Source Code Management where you can select AccuRev.

  1. Select AccuRev as your source code management system and the following options appear:

    You should see the server entry you created in the Server drop-down, and it is likely selected by default. Select it if it is not. Then enter in the names of the Depot and Stream you wish to build.
  2. Optionally, you can click the Advanced button to specify additional AccuRev options.

    In the Advanced Options section, select any of the following features:
    • Use Workspace – Determines whether or not an AccuRev workspace should be used for checkout. When you select this option, the Workspace text field appears. Enter the name of an existing workspace in the Workspace field. The plugin can manage migrating the workspace to the appropriate build machine and re-parenting the workspace to use the correct parent stream (Jenkins considers the Stream field value as the parent stream). If you use an AccuRev workspace, it should be dedicated to a particular Jenkins job to avoid problems that can arise when multiple jobs trying to retarget the workspace at the same time for builds. Note that workspace changes are logged as AccuRev transactions.
    • Use Reference Tree – Determines whether or not an AccuRev workspace should be used for checkout. An AccuRev  reference tree can be thought of as a read-only portal to the AccuRev data repository. There may be situations when the use of an AccuRev reference tree is desired, such as when you want to use the latest versions of files that you do not intend to modify.  When you select this option, the Reference Tree text field appears. Enter the name of the reference tree in the Reference Tree field. AccuRev Plug-in for Jenkins manages the process of migrating the reference tree to the appropriate build machine and relocating the reference tree to use the correct location. Note that these changes are logged as AccuRev transactions.
    • Neither – When you select this option, Jenkins checks out the latest changes without using an AccuRev workspace or reference tree.
    • Directory Offset – The relative directory path from the default Jenkins workspace location where the files from the stream, workspace, or reftree should be retrieved from. Leave this field blank if you want to continue using the Jenkins default workspace location.
    • Sub-path – Some projects only use a portion of the stream, workspace, or reference tree and, in these instances, it is not necessary to check out the entire contents of the repository, such as when you are accessing, for example, a large remote repository to build a sub-module. In such cases, it may be useful to set up a sub-path. Directories and files must be specified in the Sub-path text field as a comma-separated list and can use relative pathnames. For example, you could use: _src/com/my-company/main/my-file.java,src/com/test,src/com/webapp/my-file2.xml _where "src" is the immediate sub-folder under your stream, workspace, or reference tree.
    • Filter for Poll SCM – If the Poll SCM check box under the Build Triggers section is selected, you can use the Filter for Poll SCM field to specify the directories or files you want Jenkins to check before starting a build. Any changes made to the files or directories that you specify in the Filter for Poll SCM field will trigger a build in Jenkins. Directories and files must be specified in a comma-separated list and can use relative pathnames. NOTE: If you select Poll SCM in the Build Triggers section of the Jenkins configuration page, but you do not specify any Filter for Poll SCM files or directories, then any files or directories you have specified in the Sub-path field are used as the filter for polling. In this case, changes made to elements in the sub-path will trigger a build in Jenkins.
    • Create and build from snapshot – When you select this option, AccuRev Plug-In for Jenkins creates a snapshot of the target stream, then populates and builds from that snapshot. NOTE: If the snapshot name already exists, the process fails and the build stops.

Setting the color of stream indicators based on build results

You can set the color of the AccuRev stream indicator in Jenkins to show whether that build failed or succeeded by using the -r option <name><value> for the setproperty command, which is available in AccuRev version 6 and later. To add these commands, you must use plugins which conditionally allow you to execute these as shell script / batch commands as in the following examples.

To set the color of stream indicator as green if the build succeeds or red if it fails:

  1. Set the following conditions in the Jenkins Conditional BuildStep Plugin page ( https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin ):
  2. Using the Jenkins PostBuildScript plugin, set the following conditions:

    Note that in AccuRev 6.1.x, the property name is "streamStyle" while the property name in AccuRev 6.0.x is "style". If you are using AccuRev 6.0.x, replace "streamStyle" in the above examples with "style".

Version History

Version 0.6.28 (8/18/2014)

  • Added ability to set the color on a stream indicator based on the build result. See the section above titled, "Setting the color of stream indicators based on build results", for more information.
  • If the ACCUREV_HOME environmental variable is set, that value is added to the build environment variables
  • If the ACCUREV_BIN environmental variable is set, the AccuRev Plug-In searches for binaries in that location. If ACCUREV_BIN is not set, the AccuRev Plug-In searches the following default directory paths:
  • On Windows:
    • C:\Program Files\AccuRev\bin
    • C:\Program Files (x86)\AccuRev\bin
    • C:\opt\accurev\bin
  • On UNIX and Linux:
    • /usr/local/bin/accurev
    • /usr/bin/accurev
    • /bin/accurev
    • /local/bin/accurev
    • /opt/accurev/bin/accurev

Version 0.6.23 (3/28/2014)

  • Workspace usage restored (JENKINS-21496)
  • Changelog support for the Jenkins extended e-mail plugin
  • Transactions and issues rendered as hyperlinks in the changelog

Version 0.6.18 (8/19/2011)

  • have the option to enter multiple sub-paths (comma-separated) into the sub-path text field in the job settings. JENKINS-10538

Version 0.6.17 (8/19/2011)

  • JENKINS-10638
  • Enhancement: JENKINS-10637
  • JENKINS-10719, including
    • New feature: Ignore parent stream - can now tell a project to ignore changes made in the basis stream of the actual stream being built. This can signficantly reduce the time the plugin takes talking to the accurev server.
    • New feature: Get streams singly - more of an accurev client workaround really; the plugin used to call the server and get "the streams" which included absolutely everything under the sun, and this turns into many megabytes of data, every poll and every build. This server setting says to get just the streams we care about (our stream, our parent stream etc), albeit at the cost of potentially making more than one call to the server.
    • Enhancement: Logging improved, which should make debugging accurev client failures a little easier.

Version 0.6.16 (7/12/2011)

  • AccuRev stream name can be pre-set by Job String Parameter (JENKINS-10073)
    • make string parameter in job e.g. acstream
    • then set in stream name field:
      ${acstream}
    • SCM polling will go against the default value of the string parameter

Version 0.6.15 (5/19/2011)

  • GitHub changes since v0.6.13: GitHub Change Log
  • Made Snapshot names configurable (JENKINS-8039)
  • AccuRev Logging Enhancements, and fixed NPE during change polling (JENKINS-9601)
  • AccuRev login handling enhancements and change stream logging enhancements (JENKINS-9629)
  • Avoid login command if no username or server specified and use more accurate dates during populate (JENKINS-8935)
  • Don't trigger a new build when changes are detected if a build is already queued (JENKINS-9124)

Version 0.6.13 (3/15/2011)

  • Added option to purge overlaps when using a workspace.
  • Added option to make purge workspace optional when the previous build fails.
  • merged changes for snapshotting builds back into the current trunk (JENKINS-5196)

Version 0.6.11 (2/3/2010)

  • Plugin now using 1.345 of the parent plugin.
  • Added global option to turn off synchronization across AccuRev operations (JENKINS-4722).
  • Added global option to specify what transaction types trigger a build (JENKINS-3967).
  • Exposed environment variables to the build (JENKINS-3222):
    • ACCUREV_DEPOT
    • ACCUREV_STREAM
    • ACCUREV_SERVER
    • ACCUREV_WORKSPACE
    • ACCUREV_SUBPATH
    • ACCUREV_LAST_TRANSACTION

Version 0.6.8 (20/7/2009)

  • Plugin maintainer changed (now statlor). Activity on this plugin should pick up.
  • Fix for issue 3006 which was partially fixed in 0.6.7 but was still causing problems for many. The purpose of this version was to get a more stable release version out there, then work on more bug fixes and enhancements in subsequent releases.

Version 0.6.6 (31/3/2008)

  • Added the ability update (without purging the workspace) when using a workspace and the previous build is not broken.

Version 0.6.1 (13/12/2007)

  • Added the ability to synchronize the build server clock with the accurev server's clock.

Version 0.6 (13/12/2007)

  • Fixed some NPE's in edge cases
  • Added some help files
  • Added the ability to only populate a subset of the workspace (useful when the workspace is large, at a remote site, and you are only interested in a portion of the repository)

Version 0.5 (12/12/2007)

  • minor bug fix on global settings page whereby server ports were "forgotten"
  • removed workaround for masking passwords when authenticating to the
    accurev server
  • Known issues: Change log does not include changes in parent streams when changes
    in the stream and it's parent overlap.

Version 0.4 (3/12/2007)

  • Build triggers now reflect changes in parent streams where appropriate.
  • Now supports checkout using a workspace (I still recommend not using this option, it's there for people who _must_ use it)
  • Known issues: Change log does not include changes in parent streams when changes
    in the stream and it's parent overlap.

Version 0.2 (11/10/2007)

  • On linux, stream names were being quoted.  Now all names are unquoted. This may give rise to issues when running on windows with stream names that contain spaces.  If that's the case, will have to play dancing games figuring out the slave's operating system in order to add quotes for windows only!

Version 0.1 (11/10/2007)

  • Requires Accurev 4.5.x (I have only tested when x >= 1)
  • Currently does not support using check-out using a workspace (but why would you want that anyway)
  • Currently does not provide real time validation of inputs (i.e. depot names, stream names, username, password, etc)

Labels

plugin-scm plugin-scm Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 20, 2012

    William Crossland says:

    I've checked in a fix to the Jira issue JENKINS-15100. Please build and rel...

    I've checked in a fix to the Jira issue JENKINS-15100. Please build and release when you have a chance.https://issues.jenkins-ci.org/browse/JENKINS-15100

  2. Aug 19, 2013

    andy janes says:

    Where can I download this release? I'm not finding a link.

    Where can I download this release? I'm not finding a link.