Jenkins : Perforce Plugin


Integrates Jenkins with Perforce SCM Repositories.

Plugin Information

Distribution of this plugin has been suspended due to unresolved security vulnerabilities, see below.

The current version of this plugin may not be safe to use. Please review the following warnings before use:

This plugin is very old and not very well maintained anymore. It's recommended that you use the official plugin from Perforce instead: P4 Plugin

With this plugin you can use a workspace (aka Clientspec in Perforce speak) that will synchronize files to the Jenkins workspace. At the moment, this plugin supports:

  • Polling
  • Synchronizing
  • Browsing latest changes
  • Labeling builds (tagging)

If polling is enabled, the plugin will automatically sync to the latest revision when new changelists are found. This will also trigger a new build. Also, whenever a new build is triggered manually in Jenkins, the plugin will sync to the latest revision in the Perforce depot.


The plugin requires that the command line client p4 is installed on the machine running Jenkins.


  1. Allow the plugin to communicate with Perforce...
    1. Either create a new user or use an existing "daemon" type user
      • Note: This "daemon" user must be logged in prior to configuring or running builds with Jenkins. And you must not specify the P4CLIENT environment variable because this will overwrite anything that Jenkins is trying to do.
    2. Create a workspace (clientspec) for the plugin to use. Name it "jenkins-jobname" or something.
    3. Ensure that the workspace matches your development settings for your project (e.g., LineEnd, Options, etc.)
    4. Important Note: If you will be concurrently building multiple projects from Perforce, it would be best to create a Perforce workspace for each project.
  2. Install the plugin. Download it here.
  3. Create a new project, under "Source Code Management," choose Perforce.
  4. Enter your server specific details along with the information for the user that Jenkins will be using for polling/syncing. If you are familiar with Perforce, this all should be second nature. Remember, click on the question mark icons for context sensitive help.
  5. Under Build Triggers, check "Poll SCM."
  6. Save your changes and let Jenkins do its job.

Post Configuration

A new option will appear on your project's details page: "Perforce Polling Log." You can check this to see what Perforce has been up to...

Within any build for your project, a new option appears: "Label This Build." Click on this to see the following screen. Here you can create a Perforce Label allowing your team to sync to this build.


  • If Jenkins's copy of the project is modified outside of Perforce (say a user deletes the entire project within the workspace directory), the builds following will likely fail. This is because the local copy is out of sync with what is in the depot. Perforce tracks what you have sync'd via the workspace and the way to bring down files that you deleted "accidentally" is to do a "force" sync. If this happens, you can use the option "One Time Force Sync" in the project configuration screen. The next time a build is triggered, p4 sync will be run with the -f option.
  • Perforce has specific issues when projects within a depot exist in different local locations that don't map directly to the depot. This is precisely how Jenkins operates. To get around this requirement, we have to do some non-standard things. Every build will grab the Perforce workspace and then modify it to suit the needs of the current Jenkins project. It then syncs the projects files and performs the build. This means that no two projects utilizing the same Perforce workspace should be built at the same time. It is unknown what will happen if you are synchronizing with one build, but another build attempts to modify the same Perforce workspace. It will probably be Not Good(tm). If builds must be performed concurrently, multiple workspaces can be used to get around this.

Advanced Configuration

Sync multiple builds to the same changeset

Say you have a stream of builds that need to run and you need every build to sync to the same changeset. There are a couple of ways to accomplish this. The first is to use a counter. In your job configuration for Job A, you will need to define a P4 Counter (say "projectA-counter") and check "Update counter to most recent changeset". Assuming your perforce user has sufficient privileges to create and set counters, this will check out Job A with the latest changeset, and update the counter with that changeset number. Then you can configure the rest of the jobs to use the counter "projectA-counter" and they will automatically sync to that changeset.

The alternative way is to pass the changeset through the builds as a parameter using the parameterized trigger plugin. In order to do this, you will need to dump the changeset number from the build environment into a properties file so the trigger can read it. A build step with

echo p4.changelist=$P4_CHANGELIST >

will create the properties file that can be loaded with the parameterized trigger plugin. After that it's just a matter of adding the 'p4.changelist' parameter to the downstream job, and using it in the "P4 Label" configuration field of the perforce plugin.

Note that with both these techniques, the changelog information for the downstream builds will not be available.

Other notes

  • Please file all bugs/feature requests in the Jenkins bugtracker:
  • If you have a question or need troubleshooting, please address the jenkins-user mailing list or the Jenkins irc channel. If you fail to get a response, you may contact rpetti directly via email.

Version 1.3.8 "Create Workspace" breakage

In version 1.3.8 a new option was introduced to allow users the ability to disable automatic creation of clients. Unfortunately, the default for pre-existing jobs was not being correctly set. All existing jobs have this option set to false, which can cause build errors in dynamic environments.

If this has happened, and you want to set all jobs back to their original behavior, you can run the following groovy script in the jenkins script console:

hudson.model.Hudson.instance.projects.each{proj ->
  if(proj.scm instanceof hudson.plugins.perforce.PerforceSCM){

Note that if you went from <=1.3.7 to >=1.3.9, this issue will not affect you.

Version History

Version 1.3.36 - (Feb 11, 2016)

  • Bug fix: p4 login issue when tickets valid on every host is disallowed by the perforce server (JENKINS-28367)

Version 1.3.35 - (June 5, 2015)

  • Bug fix: failing to report error when the client returns 'Request too large'
  • Bug fix: p4 login issue when tickets valid on every host is disallowed by the perforce server (JENKINS-28367)

Version 1.3.34 - (Feb 2, 2015)

  • Bug fix: Concurrency issue in ChangeSet Buikder's parseDateWithTimezone() method (JENKINS-26839, since 1.3.31)
  • Bug fix: Properly propagate InterruptedException during the hostname calculation
  • Improvement: Decrease the log level of "Cannot find the "hostname" method

Version 1.3.33 - (Dec 30, 2014)

  • Bug fix: Escape special symbols in JOB_NAME variable (JENKINS-26119)
  • Bug fix: NullPointerException if global user/password fields are empty (JENKINS-26076)

Version 1.3.32 - Skipped due to the release process issues

Version 1.3.31 - (Dec 10, 2014)

  • New feature: Added the support of global credentials (PR #57)
  • Bug fix: Substitute build environment variables with a high priority to avoid the usage of default values (JENKINS-25559)
  • Bug fix: Don't fail with NPE if an external plugins injects null environment variable (JENKINS-25732)
  • Bux fix: Take server timezone offset into account when displaying change date (JENKINS-24401)
  • Minor fixes of possible NPEs in the code

Version 1.3.30 - Skipped due to the release process issues

Version 1.3.29 - (Nov 01, 2014)

  • Bug fix: Wrong variable substitution order of build parameters: default value is used instead of actual one (JENKINS-25226)
  • Bug fix: No variable substitution in multi-line strings (JENKINS-25365)

Version 1.3.28 - (Oct 10, 2014)

  • New feature: Support of commit info retrieval by Email-ext plugin (JENKINS-11600)
  • Enhancement: New variables substitution engine (JENKINS-23467)
  • Bug fix: Proper variables substitution order in effective client name resolution
  • Bug fix: View mask and clean can get stuck in an enabled state (JENKINS-19649)
  • Bug fix: Cannot check out folders whose path contains two matching brackets and a dash between them (JENKINS-21609)


    The version is not available via Jenkins update center. It also contains several major regressions caused by a new variables handling JENKINS-23467. Use the version at your own risk

Version 1.3.27 - (Jan 10, 2014)

  • Bug fix: refactoring to fix multiple SCM issues (JENKINS-18583)
  • Minor change: Always display at least one change in the changelog when building an older changeset
  • Enhancement: Added the ability to build changesets sequentially (JENKINS-17889)
  • Enhancement: Administrators can now globally disable password exposure

Version 1.3.26 - (Oct 09, 2013)

  • Bug fix: properly escape xml in changelogs (JENKINS-19548)
  • Bug fix: support overridable numbered workspace separator for concurrent workspaces (JENKINS-19519)
  • Bug fix: Improved MacroStringHelper in order to avoid substitution errors and improve performance (JENKINS-19557)
  • Major bug fix: fixed issue with new timeout code causing truncated p4 output

Version 1.3.25 - (Sep 09, 2013)

  • Enhancement: Check for correct variables substitution in SCM operations (checkout, poll, workspace cleanup) (JENKINS-18346)
  • Enhancement: View mask for changelog is now a separate option (JENKINS-9342)
  • Enhancement: Regex-based naming policy for Perforce client (JENKINS-18378)
  • Major bug fix: added timeout for perforce operations (JENKINS-15315)
  • Bug fix: fixed typo in charset help path (JENKINS-18783)
  • Bug fix: fixed build issue caused by java version

Version 1.3.24 - (May 17, 2013)

Version 1.3.23 - (May 16, 2013)

  • adding a warning if a file still exists after being quick cleaned (JENKINS-17439)
  • removing 'disable sync and changelog' and adding 'disable changelog' (JENKINS-16120)
  • reimplemented changelog deserialization to maintain compatibility with Hudson 3.

Version 1.3.22 - (Apr 29, 2013)

  • making improvements and fixes to exclude paths functionality (JENKINS-17652)

Version 1.3.21 - (Apr 12, 2013)

  • added more output when getting submitted changenumbers fails
  • fixed potential NPE when syncing

Version 1.3.20 - (Mar 12, 2013)

  • added SSL support

Version 1.3.19 - (Jan 10, 2013)

  • fixing issue with ticket parsing when perforce server is using login triggers that generate extra output (JENKINS-15994)

Version 1.3.18 - (Nov 28, 2012)

  • added P4USER as valid substitution during polling (JENKINS-14787)
  • fixing issue when retrying a login using tickets
  • 'status' field in job descriptions now optional (JENKINS-15043)
  • added general substitution support for P4USER and P4PORT (JENKINS-15053)
  • allow whitespaces at end of view mappings
  • fixed issue with saving configurations when blanking out system root and system drive (JENKINS-15348)
  • only overwrite p4ticket if there's a ticket to save
  • fixing P4CLIENT env variable when running concurrent builds (JENKINS-10125)
  • disable form validation on the view map, since it causes issues with large maps (JENKINS-12806)
  • fixed ticket handling problems (JENKINS-15862)
  • use the ticket when running quick clean commands when it's available (JENKINS-15807)
  • prefer the workspace changeset before depot changeset (JENKINS-15515)
  • improved perforce job handling
  • export build changenumber from perforcetagaction (JENKINS-15603)

Version 1.3.17 - (Aug 12, 2012)

Version 1.3.16 - (Aug 7, 2012)

  • added ability to use the same changeset as upstream job
  • fixed NPE when polling with view from file (JENKINS-14216)
  • update documentation (JENKINS-14363)
  • removed code that was breaking remote (UNC) workspace paths (JENKINS-14125)
  • removed redundant api exports (JENKINS-14335)

Version 1.3.15 - (June 8, 2012)

  • added 'owner' and 'description' fields to label post build action
  • fixed issue with incorrect changeset being used for syncing (JENKINS-13879)
  • fixing issue where the password was being exposed internally in jenkins' config files (JENKINS-10326)
  • added new 'quick' clean feature. this emulates a wipe+force sync, but should be faster in many circumstances

Version 1.3.14 - (May 14, 2012)

  • suppressing client spec parse warnings for blank and quoted lines
  • tagging now only requires TAG permission (as opposed to admin privileges) (JENKINS-13736)
  • fixed quoted paths issue in view parsing (JENKINS-7496)
  • added 'owner' field to advanced options for client ownership (JENKINS-13646)

Version 1.3.13 - (April 19, 2012)

  • don't return invalid perforce email addresses in the mailresolver (JENKINS-13324)
  • don't update client view when flushing workspace to 0 on workspace deletion (JENKINS-13080)
  • avoid possible NPE during startup (JENKINS-13394)
  • removed redundant slash from Perfbrowse URL
  • fixed issue with excluded files not working for changesets that include files not in the workspace view (JENKINS-13296)
  • updated pom to use new jenkins maven repository
  • avoid benign NPE when saving a config on a master with no executors (JENKINS-13353)
  • fixed issue with parameter substitution in counter name field
  • added support for displaying integrated changesets
  • always put P4TICKET into environment (JENKINS-13270)
  • added limit for number of files per changelist in order to avoid OOM on large changes (JENKINS-13109)

Version 1.3.12 - (March 29, 2012)

  • fixed NPE that occurs when parsing changes containing a deleted perforce user (JENKINS-13271)

Version 1.3.11 - (March 26, 2012)

  • added case sensitivity option for exclusion of files from polling (JENKINS-13147)
  • exclude .p4config from wipe on checkout (JENKINS-13108)
  • fixed some issues with the mailresolver (JENKINS-13103)
  • added concurrent build support (Thanks Mikko!) (JENKINS-10125)
  • added warning to build log when stripping invalid lines from client spec (JENKINS-13027)
  • wipe before build option no longer flushes the client (since it's just doing a force sync anyways) (JENKINS-13073)
  • allow the usage of build parameters during workspace deletion (JENKINS-13073)
  • fixing some log messages for workspace deletion
  • build properties now override global ones as expected
  • use 'p4' by default if no global p4 installation is defined (JENKINS-13062)

Version 1.3.10 - (March 8, 2012)

  • added support for parameters in stream names
  • added support for controlling 'Disable Sync' and 'Disable Sync and Changelog' options using job parameters
  • improved email resolution for mailer plugins to increase speed and prevent potential hangs
  • added form validation for '-p' and '-f' perforce flag conflict (JENKINS-12948)
  • added support for multiple tags (JENKINS-12906)
  • fixed node-level tool installation location overrides

Version 1.3.9 - (Feb 28, 2012)

  • fixed incorrect default for "Create Workspace" when upgrading to 1.3.8.
  • perforce installations now use the Jenkins ToolInstallation model and are globally and node-level configurable (JENKINS-11369)

Version 1.3.8 - (Feb 21, 2012) (See the note above if you installed this version)

  • added support for Perfbrowse repository browser (thanks verbitan!)
  • fixed some inconsistent string references in help (thanks 4ndrew!)
  • api changes for better artifactory plugin support (thanks yossis!)
  • added 'Let Jenkins Create Workspace' checkbox (thanks garious!)
  • added support for perforce streams (thanks miktap!)
  • fixed form validation on exclude fields when using parameters (JENKINS-12202)
  • fixed issue with slow email resolution (JENKINS-12672)
  • added substitution for counter field (JENKINS-12755 thanks Andy!)
  • plugin now uses the full build environment for parameter substitution, not just job/global parameters (JENKINS-12837)

Version 1.3.7 - (Jan 10, 2012)

  • fixed issue where list of changes includes pending ones, which can cause consistency problems
  • added substitution support to Files/User exclusion fields (JENKINS-12202)

Version 1.3.6 - (Dec 12, 2011)

Version 1.3.5 - (Nov 17, 2011)

  • fixed issue with labeling not working when using a client spec from a file in perforce
  • fixed parameter substitution when using client spec from a file
  • only use the label field for syncing if the parameters in it actually resolve to something non-empty (JENKINS-11677)
  • fixed typo in log output (JENKINS-11740)

Version 1.3.4 - (Nov 3, 2011)

  • perform parameter substitution on clientSpec path when using a file from perforce for the client spec (JENKINS-11423)
  • fixed support for date and revision changelog information in email-ext (JENKINS-11600)

Version 1.3.3 - (Sep 29, 2011)

  • added support for promoted builds plugin to perforce label publisher/notifier
  • don't set P4_CHANGELIST when no changelist is (yet) available. Should solve some consistency issues with envinject.

Version 1.3.2 - (Sep 21, 2011)

Version 1.3.1 - (Sep 8, 2011)

  • add the possibility to use a textual ClientSpec file from the depot to setup the workspace view
  • make all matrixruns use the same changeset as the parent (JENKINS-10592)
  • fixing minor issue with label changeset retreival
  • reimplementation of 'where' mapping for changelog information (JENKINS-10732)

Version 1.3.0 - (July 27, 2011)

  • fixing possible cast exception with new polling method (JENKINS-10411)
  • updated to new polling api to fix issue with polls queuing up additional builds when one is already syncing (this increased the minimum jenkins/hudson version from 1.339 to 1.346)

Version 1.2.9 - (July 15, 2011)

  • minor tweak to docs explaining that 'sync -p' can't work at the same time as 'sync -f' due to a weird limitation in perforce (JENKINS-9819)
  • added nodename substitution for client workspace names on slave machines, with the disclaimer that it may not work with all slave names (JENKINS-10334)
  • removing tek42 depot from pom, since it's down indefinitely
  • fixed issue with 'p4 where' parsing (JENKINS-7618)
  • minor tek42 api bugs

Version 1.2.8 - (July 4, 2011)

  • fixed maven incremental builds integration (JENKINS-7618)
  • changed FishEye links to use changelist number instead of revision number for file diffs (for reals this time) (JENKINS-7747)

Version 1.2.7 - (Jun 20, 2011)

  • check to see if the user exists before attempting to get it's email address (JENKINS-6079)
  • added option to set the owner of a label when manually tagging a build (JENKINS-8354)
  • labels will now have their owner set to the configured perforce user by default (JENKINS-8354)
  • added support for 'p4 sync -p' (JENKINS-9819)
  • fixed issue with JOB_NAME substitutions including incompatible characters for client names (JENKINS-9906)
  • fixed '500' error when saving a user config (caused by missing field)

Version 1.2.6 - (Jun 3, 2011)

  • fixed issue with email ext plugin not displaying changelists (courtesy of 8nevil8 from Oracle)

Version 1.2.5 - (Apr 22, 2011)

  • fixed bad javascript on configuration page that could result in the config page not loading

Version 1.2.4 - (Mar 24, 2011)

  • added "Poll only on Master" option for distributed build environments (JENKINS-9067)
  • fixed NPE when wiping out workspace using the jenkins UI (JENKINS-9022)
  • refactored the way user IDs are stored in order to support email retreival for oddly formatted user names (ie. domain\user) (JENKINS-8987)
  • refactored polling to use configured nodes without needing online workspaces. It will now fall back to polling on the master if none are available (JENKINS-8173)
  • changed hostname retrieval to use the more reliable function provided by jenkins

Version 1.2.3 - (Mar 1, 2011)

  • strip quotes from View Mask entries to prevent issues on the command line (JENKINS-8731)
  • add error logging and detection for file-specific sync errors (JENKINS-8840)
  • add ability to clean .repository for every build (by popular demand) (JENKINS-7182) (JENKINS-8211)

Version 1.2.2 - (Feb 21, 2011)

  • fixed major problem with client name substitution on slave machines (sorry)

Version 1.2.1 - (Feb 18, 2011)

  • fixed major problem with client name substitution on slave machines

Version 1.2.0 - (Feb 11, 2011)

  • be more aggressive with closing pipes
  • adding Disable Syncing Only option (JENKINS-8260)
  • added exclude users and exclude files polling options
  • fixed potential issue where "Enter Password:" could be used as the perforce ticket in certain circumstances
  • changed branding to consider Hudson->Jenkins rename
  • allow changeset number to decrease between builds (in case of forced builds, or p4 server rebuild)
  • added log filtering for p4 sync, which should prevent out of memory issues during large syncs (JENKINS-2142)

Version 1.1.14 - (Jan 6, 2011)

  • adding p4 response output when some more obscure parsing errors occur (JENKINS-8409)
  • don't launch a new build when polling when the client-workspace is 'new'. this should avoid continuous building when using the broken remoting api in hudson (for hudson versions >= 1.378)
  • first release from github!

Version 1.1.13 - (Dec 7, 2010)

  • added another partial fix for intermittent connection issues in hudson >=1.378 (thanks Kohsuke!) (JENKINS-7664)

Version 1.1.12 - (Nov 18, 2010)

  • added a partial fix for intermittent connection issues in hudson >=1.378 (JENKINS-7664)

Version 1.1.11 - (Oct 29, 2010)

  • skip Maven private .repository directory when wiping out the workspace. More appropriate fix for this should be coming eventually. (JENKINS-7182)
  • use changelist number instead of revision number when loading links to fisheye for file diffs (JENKINS-7747)
  • make P4PASSWD environment variable (if enabled) always contain the password, instead of defaulting to the p4 ticket when it's available. Also added P4TICKET environment variable for those who need the ticket instead. (JENKINS-7757)

Version 1.1.10 - (Oct 6, 2010)

  • fixed issue with changeset parsing when comments contained certain reserved phrases (JENKINS-7679)
  • changed polling logic to fall back to another available node when the last one used to build is unavailable. only applies to workspaces names that are constant across slaves (JENKINS-7665)
  • fixed parsing issue when labelling using client specs from perforce, ie. when hudson is not set to manage the workspace. (JENKINS-7642)
  • removed noisy logging from requiresWorkspaceForPolling function (JENKINS-7622)

Version 1.1.9 - (Sep 29, 2010)

  • fixed problem where polling will not work on slaves when using client name substitutions (JENKINS-7610)
  • fixed empty dropdown menu for line endings option when creating new jobs (JENKINS-7606)
  • added better error messages when user fails to create a workspace for hudson when hudson isn't set to manage it on it's own (JENKINS-7555)
  • fixing NPE when labelling a build that isn't configured to let hudson manage the client workspace (JENKINS-7558)

Version 1.1.8 - (Sep 22, 2010)

  • adding support for client mappings of the form //depot/... "//workspace/..." in order to allow spaces in the workspace path when they don't exist in the depot path. (JENKINS-7496)

Version 1.1.7 - (Sep 16, 2010)

  • work around to prevent the job history plugin from recording a change in the perforce configuration when none has been made (JENKINS-6994)
  • adding automatic labeling functionality (JENKINS-7301)

Version 1.1.6 - (Sep 7, 2010)

Version 1.1.5 - (Aug 23, 2010)

  • making changeLogFilename transient so it doesn't pollute the config.xml with unneeded parameters (JENKINS-6994)
  • perform a force sync or clean workspace when P4FORCESYNC or P4CLEANWORKSPACE parameters are set to true respectively (JENKINS-6526)

Version 1.1.4 - (July 2, 2010)

  • Fixed an issue with file and diff links when using fisheye. (JENKINS-6911)
  • Added changeNumber and changeTime to the xml api output for builds. (JENKINS-6836)
  • Reverting hack to prevent polling from running when a job has just been copied, but not yet configured. This is handled by hudson core now. (JENKINS-5975)

Version 1.1.3 - (Jun 14, 2010)

Version 1.1.2 - (Jun 11, 2010)

  • Added support for parameter substitution in view spec during polling. (JENKINS-6696)
  • Fixed a case when using view masks for polling that may cause builds to run continuously. (JENKINS-6576)
  • Adding support for parameter substitution in the view mask.

Version 1.1.1 - (Jun 2, 2010)

  • Added IMPORT as a valid perforce change during changelog parsing. (JENKINS-6686)

Version 1.1.0 - (May 21, 2010)

  • Fixed issue with polling and distributed builds. Thanks martinfr62! (JENKINS-6575)
  • Added parameter substitutions on base client name. (JENKINS-6519)
  • Made the plugin always clear the Host: field in the client spec for shared clients. (JENKINS-6412)
  • Limit number of changesets pulled on the first run of a job (JENKINS-6391)
  • Prevent builds from getting triggered by polling when the job has never run before (JENKINS-5975)
  • Updated documentation (JENKINS-6304)

Version 1.0.29 - (Apr 19, 2010)

  • Fixed potential problem where a job with client updating disabled will always force sync if the client workspace root is different.
  • Added some logging in the event the remote call for determining the slave hostname fails. (JENKINS-6257)
  • Added option to poll and/or sync a subset of depot paths in a job (JENKINS-2926)
  • Added options for P4CHARSET and P4COMMANDCHARSET (JENKINS-6284)

Version 1.0.28 - (Apr 9, 2010)

  • Fixed issue with LineEnd option getting set to 'null'. (JENKINS-6173)
  • Added code to trigger force-sync when job workspace root is changed in the project configuration. (JENKINS-6219)

Version 1.0.27 - (Apr 5, 2010)

  • Added line endings option to select the LineEnd field used by the client workspace. (JENKINS-6074)
  • Added some processing to the client root to avoid things like double slashes.
  • Added error handling to perforcemailresolver to avoid error when running the build for the first time. (JENKINS-6079)
  • Made force syncing optional (but highly recommended) for matrix builds.

Version 1.0.26 - (Mar 25, 2010)

  • Fixed build issue with unix slaves that don't have hostnames properly defined.
  • Fixed problem with workspace paths that contain single-character path elements (JENKINS-6064).
  • Adding support for changeset links to p4web.

Version 1.0.25 - (Mar 20, 2010)

  • Changed polling code so that it won't trigger a build if the job has never been run before. (JENKINS-5975).
  • Adding code to clear the P4CONFIG environment variable before executing any operations on the node. This should alleviate issues with config files interfering with the hudson perforce config. (JENKINS-4595)
  • Removed "do not rename workspace" option and replaced it with a formatted string to allow for more robust customization of the client workspace name on slaves.
  • Added the environment variable HUDSON_CHANGELOG_FILE that contains the location of the changelog xml, so builds with custom sync logic can modify it.
  • Added advanced option to disable syncing (for builds that need custom syncing logic in scripts)
  • Added advanced option for disabling client updating entirely (JENKINS-5841).

Version 1.0.24 - (Mar 12, 2010)

  • Changed the automatically generated client name for slaves to use the hashcode of the slave name instead of the hostname, so that hosts running multiple slaves can sync correctly (JENKINS-5917).
  • Fixed an issue where polling wouldn't work correctly if the client spec was recently changed (JENKINS-5915).
  • Made matrix/multiconfiguration builds always force sync in order to overcome client workspace consistency issues.
  • Improved the readability of the online configuration help.
  • Added option to clean the entire workspace and resync before every build (JENKINS-5182).
  • Fixed possible issue during build tagging when depot view contains spaces.
  • Fixed possible NPE that can occur during build tagging.

Version 1.0.23 - (Mar 5, 2010)

  • Adding support for parameters to the View and Label configuration fields. (JENKINS-5690) Users can now use ${PARAMNAME} to substitute values into the View and Label fields. If substitutions are present, however, polling will be disabled.
  • Fixed form validation false negatives when using certain browsers. (JENKINS-5849).
  • Added support for "Wipe Out Workspace" and added new "Always Force Sync" option. (JENKINS-5182).
  • Reverted form validation change (JENKINS-5342). A better solution is in the works.
  • Added logger to PerforceMailResolver

Version 1.0.22 - (Feb 27, 2010)

  • Adding error reporting when 'Request too large' problems occur during changeset population and syncing.
  • Changed form validation to recognise depot-only view lines as being invalid to avoid confusion (JENKINS-5343).
  • Applying fix provided by avolanis to resolve issue when using counters in downstream builds that are triggered by polling.

Version 1.0.21 - (Feb 19, 2010)

  • Adding additional logging for the email resolver to help troubleshoot issues some are having.
  • Added a retry to the email resolver commands.
  • Fixed an issue with the email resolver when running a linux slave on a windows master and vice versa (JENKINS-5403)

Version 1.0.20 - (Feb 16, 2010)

Version 1.0.19 - (Feb 13, 2010)

  • Fixed issue with p4 executable config parameter not being used properly for all perforce operations (JENKINS-5506)
  • Changed requiresWorkspaceForPolling to allow polling to take place during a build (JENKINS-5545)
  • Removed deprecated call to AbstractProject.getWorkspace
  • Added sanity check to cause perforce commands to fail immediately if the executable path doesn't point to an executable (used to cause hang on windows)
  • Added code that tries to clean-up pipes after a failure described above.
  • Added extra checking and robustness to perforcemailresolver to try and address issues people are having with email resolution.

Version 1.0.18 - (Feb 1, 2010)

  • Fixed issue with P4CLIENT environment variable passing in wrong value on slave machines. (JENKINS-5332)
  • Adding '@' to revision field in labels during label generation. (JENKINS-5398)
  • Added the ability to sync an entire build stream to a single changeset. (JENKINS-4603)
  • Added an option to pass the perforce password into the environment as P4PASSWD.
  • Fixed a minor login bug in the tek42 perforce api.
  • Fixed an issue where the full path to the p4 executable was not being used in the tek42 perforce api.

Version 1.0.17 - (Jan 20, 2010)

  • Fixed minor bug with changelog items not saving correctly (JENKINS-5217)
  • Replaced sun base64 encoder/decoder classes with apache commons codec (JENKINS-4446)
  • Fixed setting of P4CLIENT in the build environment variables (JENKINS-5317)

Version 1.0.16 - (Jan 4, 2010)

  • added common p4 variables to the build environment: P4PORT, P4USER, P4CLIENT
  • Cleaned up view mapping regular expressions, and how they were used to parse and check views.
  • Added automatic workspace path inference for the most common 1:1 depot:workspace paths.
  • Removed p4 retry loop since Hudson now has global SCM retry support.
  • Removed the p4java jar from the deps in the pom since it is not yet used by this version in the trunk.
  • (some of these may have been released in 1.0.15)

Version 1.0.15 - (Nov 19, 2009)

  • Reorganized the config controls for the Perforce plugin to gather most of the options into
    main groups of Setup, Depot and Project.
  • Updated the help as well.
  • Included P4Java jar in deps (unused for now)
  • Applied the patch provided by jmax01, to add new enum values for MOVE/ADD MOVE/DELETE operations (JENKINS-4425)
  • Removed 'depot' instance variable that was being modified by multiple threads simultaneously, this allows perforce commands to be issued from the correct slave nodes.
  • Changed master matrix job to not alter the perforce client root, so that the child matrix job would get the update. (JENKINS-1022)

Version 1.0.14 - (July ?, 2009)

Version 1.0.13 - (4/6/2009)

Version 1.0.12 - (5/15/2008)

  • Fixed issue: 1163, Sync'ing on Hudson Slaves is now supported. Thanks go to Victor (vicsz).
  • Fixed issue: 1681, Labeling builds on JVMs earlier than 1.6 were failing.

Version 1.0.11 - (4/22/2008)

  • Fixed issue: 1313, Sync'ing to Perforce labels is now supported.
  • Added enhancement: 1374, Hudson user's email address is retrieved from Perforce user account if it exists.

Version 1.0.10 - (1/26/2008)

  • Fix issues: 1070, 1072, 1073/1100, 1092, 1093
    • Now supports changelists with purged files.
    • The current changelist number is available as an enviroment variable: P4_CHANGELIST. Thanks go to Eike and gerhard6.
    • Fixed changelist parsing with certain versions of Perforce, thanks go to Kiril.
    • Fixed il8n parsing of changelists, thanks go to gerhard6.
  • Using the latest P4Java version, 0.7.5.

Version 1.0.4 - (11/13/2007)

  • Support for polling/sync'ing with multiple views in a single workspace
  • Uses new P4Java version that supports Perforce security level 3
  • Fixed issue when prior build does not have any changes

Version 1.0.3 - (10/26/2007)

  • Fixed issue where the last sync'd changelist would be lost on a restart of Hudson. This resulted in the next build after a restart being marked as containing all prior changes.
  • Fixed issue with improper XML encoding of changelist history.
  • Fixed issue with invalid characters in XML of changelist history.
  • Fixed issue where a manual build would always be marked as failed if there were no new changes present.
  • Changed validation to allow project paths that start with something other than //depot/
  • Fixed problem with changelist icons not showing up on unix systems.
  • Fixed NPE on first build of a new project
  • Added ability to specify first change to record history from
  • Added ability to use workspace with custom views specified by end user.

Version 1.0 - (10/09/2007)

  • Support for repository browsing with P4Web and Fisheye
  • Support for tagging of builds (Referred to as Labels in Perforce, so that is what is used in the plugin)
  • Support for doing a force sync to head (allowing Hudson to bring down all project files)
  • Perforce security level 3 is supported on unix systems. Windows currently requires a workaround.
  • Fixed bug on unix systems where workspace root was incorrect.
  • Validation of Perforce settings is now done on configuration page.
  • The Perforce workspace (clientspec) descriptions are no longer lost after a build.

Version 0.9 - (10/04/2007)

  • Production ready release. Includes support for displaying change history. Perforce specific details, such as Jobs, are included in reporting.

Version 0.5 - (9/29/2007)

  • Initial release. Includes support for polling and synchronizing. Repository browsing and latest changes still to come. 


As mentioned above, do NOT use the wiki comments to ask for support! If you have a question, you should ask the mailing list or the irc channel. You should also check the list of open issues on the issue tracker. Failing that, you can contact rpetti directly for assistance.