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.22
Dec 19, 2013
1.525
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Scott Tatum (id: statler)
Clint Martin (id: helterscelter)
Usage Installations 2013-Mar 258
2013-Apr 267
2013-May 281
2013-Jun 289
2013-Jul 298
2013-Aug 309
2013-Sep 304
2013-Oct 319
2013-Nov 326
2013-Dec 305
2014-Jan 322
2014-Feb 325

Configuring the AccuRev Plugin

First things first - install the plugin, either through the Jenkins plugin administration, or manually.

Configuring the AccuRev Server Settings

Select Manage Jenkins from the main menu, then select Configure System from the options presented:

If the plugin was installed properly, you should find a section on this page for AccuRev which looks like this:

Click Add to add a new server definition:

Fill in the each of the settings:

  • Name - a descriptive name for this entry. When you go to configure a new build, this name will show in the server drop-down for AccuRev.
  • Host - the host/IP of the AccuRev server. If you're not sure what this is and you have your AccuRev client installed (which you have to install in order for any of this to work), select Info from the Tools menu and you'll find the server name there.
  • Username - self-explanatory
  • Password - self-explanatory

Hitting the Advanced... button reveals three more options:

  • Port - port of AccuRev server connection. By default, this is 5050.
  • Valid Transaction Types - A comma-separated list of AccuRev transaction types that trigger a build. By default, all transaction types are listed. Those who use the AccuWork integration (AccuRev issues) will want to remove dispatch from the list. This will keep issue changes from triggering a build. Currently, I only have promote and chstream in my list.
  • Synchronize AccuRev CLI Operations - Controls whether or not only one AccuRev CLI operation can be running at any given time, across all jobs on the same node. By default, this is enabled to preserve original functionality. It was determined that the synchronization of all CLI operations was slowing some nodes down considerably, where one job would be doing a large checkout and cause all other jobs to block waiting on the lock. Turning off synchronization should be safe - however, if you think you are having problems with concurrent executions of AccuRev, please let the author know through the users mailing list, or open an issue.

Now scroll to the bottom of the page and make sure you hit the Save button, otherwise your changes will not take.

Configuring a Build to Use AccuRev

Once the server settings are configured, new builds can choose it for pulling down code. Create a new build, give it a job name, and select the type of build (free-style, maven2, etc) and click OK. On the subsequent screen, you'll see a section called Source Code Management where you can select AccuRev. Select AccuRev, and the following options will 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.

Advanced Options

There are three advanced options at the job level. The inline help provides detailed information on these, so take advantage of them for detailed information. Here is a summary:

  • Use workspace - Determines whether or not an AccuRev workspace should be used for checkout. By default, Jenkins will checkout the entire fileset for the stream every time and not use a workspace. By checking this option, a text box will appear to configure the name of the workspace to use. This workspace must already exist, but Jenkins will move the workspace around if need be (such as between slave machines) once it is created. It is important to note that if you do use a workspace, it should be one dedicated to a particular Jenkins job - if you use the workspace outside the context of Jenkins, or have multiple jobs trying to retarget the workspace at the same time for builds, you could end up with some bad problems. Also, workspace changes get logged as AccuRev transactions.

If you decide to stop using a workspace after having done a build, you must manually go into accurev and move the workspace directory so that it does not point at the jenkin's workspace location.

The following options are only valid when you are using a workspace:

    • Purge Workspace If Last Update Failed - option allows you to specify whether or not a failed build will result in the next subsequent build purging and re-populating the workspace. this used to be the default behavior however in some instances it is not wanted. 
      NOTE: Disabling this option may result in subsequent builds continuing to fail where they would normally have succeeded after a purge/populate.
    • Use Update - Selecting this option will enable the plugin to skip the purge step and just use update (followed by a populate just in case any files went missing).
      NOTE: however, in order to allow Jenkins to recover from the "cannot complete update" situation a purge will  be performed if the last build failed and the "Purge workspace if last update failed" option is enabled. (in most cases enabling "use revert" will prevent jenkins from needing to purge the whole workspace in the first place.
    • Use Revert - This option causes the accurev plugin to revert any overlapped entries in the workspace prior to performing an update of the workspace. Overlapped entries cause the update step to fail, which in turn causes the build to be marked as failed. (which in turn causes the next build to purge the workspace and therefore negate any purpose in using workspaces) 

this option is primarily useful in cases where you are using an accurev workspace and when performing a build on that workspace would cause artifacts to overlap in the parent stream. If you keep getting warnings and failed builds due to overlaps, and you don't want to purge the entire workspace on each build then you need this option.

  • Synchronize clock with AccuRev server - Analagous to the synctime command of the AccuRev CLI or the Synchronize Time option in the AccuRev GUI client. If you start getting build errors about time synchronization, check this box.
  • Sub-path - It is possible to populate only part of a workspace, and the sub-path option allows a way to specify only the subtree of the workspace that you want to be populated before build. However, there are caveats. See the inline help for more detail.

There are a couple of important things to know about using AccuRev workspaces with this plugin. The first is that, even though you are using a workspace, the plugin will purge and repopulate the workspace whenever there is a failed build. Also, sometimes Hudson will trigger a build when no files have changed in the backing stream. These are due to limitations / issues with the AccuRev CLI (at least, the 4.5.* versions).
You can then move on to other options, such as configuring the build to poll AccuRev, or perform a periodic build. Again, be sure to select the Save button at the bottom of the page. You are now ready to try running your build, which should check out the code from AccuRev automatically.

Version History

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

Edit
plugin-scm plugin-scm Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment