Perforce Plugin

Summary

Integrates Hudson with Perforce SCM Repositories.

Plugin Information

Plugin ID perforce
Latest Release 1.0.18
Latest Release Date Feb 01, 2010
Changes via Fisheye In Latest Release
Since Latest Release
Maintainer(s) Carl Quinn (id: javadude)
Rob Petti (id: rpetti)
Issue Tracking Open Issues

With this plugin you can use a workspace (aka Clientspec in Perforce speak) that will synchronize files to the Hudson 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 Hudson, the plugin will sync to the latest revision in the Perforce depot.

Requirements

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

Usage

  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 Hudson. And you must not specify the P4CLIENT environment variable because this will overwrite anything that Hudson is trying to do.
    2. Create a workspace (clientspec) for the plugin to use. Name it "hudson" 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 Hudson 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 Hudson 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.

Quirks

  • If Hudson'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 Hudson 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 suite the needs of the current Hudson 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.

Version History

Version 1.0.18 - (Feb 1, 2010)

  • Fixed issue with P4CLIENT environment variable passing in wrong value on slave machines. (issue #5332)
  • Adding '@' to revision field in labels during label generation. (issue #5398)
  • Added the ability to sync an entire build stream to a single changeset. (issue #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 (issue #5217)
  • Replaced sun base64 encoder/decoder classes with apache commons codec (issue #4446)
  • Fixed setting of P4CLIENT in the build environment variables (issue #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 (issue #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. (issue #1022)

Version 1.0.14 - (July ?, 2009)

Version 1.0.13 - (4/6/2009)

  • Fixed the configuration persistence issue (issue #2288)

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.

Labels:

plugin-scm plugin-scm Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Oct 25, 2007

    Anonymous says:

    Nice! Have been waiting for Perforce support.

    Nice! Have been waiting for Perforce support.

  2. Feb 18, 2008

    Anonymous says:

    Nice plugin. Unfortunately this plugin (v1.0.10) can not check out from a label ...

    Nice plugin. Unfortunately this plugin (v1.0.10) can not check out from a label yet, see https://hudson.dev.java.net/servlets/BrowseList?list=dev&by=thread&from=976444

    1. Apr 22, 2008

      Mike Wille says:

      Version 1.0.11 now supports this.

      Version 1.0.11 now supports this.

  3. Feb 27, 2008

    Felipe Leme says:

    In my environment, when a file is deleted Hudson does not detect it. It might be...

    In my environment, when a file is deleted Hudson does not detect it. It might be a Perforce configuration issue, but thanks to Hudson's flexibility, I could provide a quick workaround by enabling the "Shell script" option and adding the following command:

    p4 sync "$PWD/..."

    (sure, it's a Unix-only trick, but I don't even consider running CI on Winblows

    1. Apr 22, 2008

      Mike Wille says:

      The Perforce plugin for Hudson interacts directly with the P4 client so there sh...

      The Perforce plugin for Hudson interacts directly with the P4 client so there should be no need to run this command. I wonder if the workspace is being used in multiple projects? It might be thinking the file was already removed when executed from the other project. Though it sounds like you are fine with it, this can be fixed if you wish to pursue it.

  4. Feb 28, 2008

    Anonymous says:

    Hi, Trying to use this plugin with our version of perforce (2003.2 56323), but ...

    Hi,

    Trying to use this plugin with our version of perforce (2003.2 56323), but am getting these error:Caught Exception communicating with perforce. Error in client specification. Error detected at line 7. Null directory (//) not allowed in '///...'.
    For Command: p4 -s client -i
    With Data:
    ===================
    Client:
    Description:
    Root: C:\Development\XP\CI\Hudson\jobs\Framework\workspace\
    Options:
    LineEnd:
    View:
    //depot/Framework/current/... ///...

    Why isnt there a clientspec name in the view definition?

    Thanks

    Mike 

    1. Apr 22, 2008

      Mike Wille says:

      This looks to be the same problem described here: https://hudson.dev.java.net/i...

      This looks to be the same problem described here:

      https://hudson.dev.java.net/issues/show_bug.cgi?id=1070

      I believe that 2003.x and earlier servers do something different that the Perforce library does not support. Unfortunately, the oldest version of Perforce I can get my hands on is 2005. So I can't even reproduce the problem.

      1. Jul 21, 2008

        Danny Aden says:

        I have run into a similar issue, with a different error message running P4 serve...

        I have run into a similar issue, with a different error message running P4 server version (Server 2006.1/109255.).

        I assumed this error meant that the client needed the environment variable P4CHARSET=utf8, but I have tried setting this in the environment variables with no luck and didn't see a way to specify it through the plugin.  I noticed that the client workspace appears to be null as the plugin tries to set the client view to ///... so it seems like this might be related.

         Here is the error from the logs:

        ======
        [workspace] $ p4 workspace -o bld-blbaker-a7-blaze-windows-continuous-hudson
        Changing P4 Client Root to: c:\tomcat6\webapps\hudson\jobs\blaze-continuous\workspace\
        Changing P4 Client View to: //blaze/trunk/... ///...
        [workspace] $ p4 -s client -i
        Caught Exception communicating with perforce. Unicode server permits only unicode enabled clients.
        ======
         Any ideas of what I am doing wrong?  I tried running "p4 -u bld -s client" from a comand prompt and it seems to work fine (-u bld is because I am running as a different p4 user than the user logged into the build box).

        Thanks,

        ~D

  5. Apr 18, 2008

    Bila Nagirner says:

    Hello,  When building on a slave machine our code is being checked out on ...

    Hello,

     When building on a slave machine our code is being checked out on the master machine.  Is there anyway to get it to checkout to the slave machine?

     Thanks,

    Bila

    1. Apr 22, 2008

      Mike Wille says:

      Not yet, unfortunately. See this issue for updates: https://hudson.dev.java.ne...

      Not yet, unfortunately. See this issue for updates:

      https://hudson.dev.java.net/issues/show_bug.cgi?id=1163

  6. Nov 06, 2008

    LeoT says:

    Hi, Is it possible to name a build by latest change list number ? Is it possib...

    Hi,

    Is it possible to name a build by latest change list number ?

    Is it possible to add change list number to notification emails ?

  7. Jan 16, 2009

    mm says:

    Hi. hudson : ver1.270 p4.exe  P4/NTX86/2007.3/143793 (2008/01/21). perforc...

    Hi.

    hudson : ver1.270
    p4.exe  P4/NTX86/2007.3/143793 (2008/01/21).
    perforce_plugin :1.0.12

     When I tried to label a build , I get the following exception:

    --

    java.io.IOException: Failed to issue perforce label. Error in label specification. Error detected at line 5. Unknown field name 'Revision'.
    For Command: p4 -s label -i
    With Data:
    ===================
    Label: hoge-Build-57
    Owner:
    Description:
        Changelist: 106
    Revision: 106
    Options:
    View:
        //depot/...

  8. Feb 23, 2009

    Christian Presslmayr says:

    Hi! I was looking for a fix of an issue in Perforce plugin, and I found out...

    Hi!

    I was looking for a fix of an issue in Perforce plugin, and I found out, that it has already been fixed in the source code, but it has NOT yet been published in a stable build. Please see my comment in issue #1100 (https://hudson.dev.java.net/issues/show_bug.cgi?id=1100). Further, I'm interested in getting the fix for issue #1745 (https://hudson.dev.java.net/issues/show_bug.cgi?id=1745), because I encountered the same problem.

    I am looking very much forward to a new stable build of the Perforce plugin - when will it be released?

    Or how can I access a snapshot-version (talking in Maven dialect) of the Perforce plugin?

    Thanks for your help,

    Chris

  9. Apr 08, 2009

    Brett Cashman says:

    The 1.0.13 release no longer appears to honor the Let Hudson Manage Workspace Vi...

    The 1.0.13 release no longer appears to honor the Let Hudson Manage Workspace View flag; Hudson always tries to manage the workspace view, even when the flag is deliberately unset, and as a result it can't cope with the Depot Path set to //... .  Had to revert to 1.0.12 of the plugin after this generated a series of build failures.

    1. May 12, 2009

      David Saff says:

      I'm having the same problem, Brett.  Did you log a bug I can vote on? &nbs...

      I'm having the same problem, Brett.  Did you log a bug I can vote on?

        David Saff

      1. May 21, 2009

        Brett Cashman says:

        David, didn't, sorry. But if you log one, I'll vote for it.

        David, didn't, sorry. But if you log one, I'll vote for it.

  10. Jun 04, 2009

    Dietmar Steinberger says:

    I installed the Trac Plugin and wanted to set "Trac" for the "Repository browser...

    I installed the Trac Plugin and wanted to set "Trac" for the "Repository browser" setting in the Source Code Management section for Perforce but it is not available (it is available for the SVN SCM)

    How  can Trac be added there (P4Web and FishEye are available) or has it to be implemented which would be nice if you could do

  11. Jul 23, 2009

    chirag dave says:

    Hi! All, I'm trying to use perforce plugin for setting up my contineous bui...

    Hi! All,

    I'm trying to use perforce plugin for setting up my contineous build environment.

    The worst part here is i am not getting any error from perforce plugin so that i can debug that where am i going wrong in configuring environment.

    I am following steps described in this tutorial.

    whenever it invokes perforce plugin logs shows up  onlyStarted on Jul 23, 2009 2:23:37 PM
    Looking for changes...
    Using master perforce client: chirag.dave_hudson
    [workspace] $ p4 workspace -o chirag.dave_hudson
    and hangs up. 

    I am using hudson 1.314

    and perforce :- 1.0.14

    Perforce client version - 2008.1/158777

    Here is the configuration data that i have been trying.

    [perforce_plugin_err.bmp]

    Any help will be appreciated.

    Thanks,

    Dave. 

    1. Aug 06, 2009

      Chris Hilton says:

      It looks like your view specification is incomplete. Click on the question mark ...

      It looks like your view specification is incomplete. Click on the question mark to the right and you'll see that your view should include depot and workspace file specs.

  12. Aug 06, 2009

    Chris Hilton says:

    On another note, I'm just getting started on Hudson and wonder how is the FishEy...

    On another note, I'm just getting started on Hudson and wonder how is the FishEye integration supposed to work? My project has a view like this:

    //depot/userbranches/ulfertsm-main/main/... //hudson_ulfertsm-main-DEVBUILD-HUDSON-V/...
    
    //depot/zpm/main/build/new-nightly/bamboo/local-product.properties //hudson_ulfertsm-main-DEVBUILD-HUDSON-V/local.properties
    
    //depot/3rdparty/jboss/4.2.3/... //hudson_ulfertsm-main-DEVBUILD-HUDSON-V/jboss/...
    

    And I've defined the FishEye URL as "http://devtools2-v.austx.zilliant.com/browse/Zilliant_Perforce/", the top of the Perforce depot which may or may not be correct (I'm mostly interested in being able to see files under the userbranch above). I do end up with hyperlinked files in the changes area, but a file like this:

     //depot/userbranches/ulfertsm-main/main/policymgt/optimization/server/product/config/pricingDocumentDefinitions/optimization/EngineRecommendations.xml
    

    ends up with a link like this:

     http://devtools2-v.austx.zilliant.com/depot/userbranches/ulfertsm-main/main/policymgt/optimization/server/product/config/pricingDocumentDefinitions/optimization/EngineRecommendations.xml
    

    Which doesn't work nor any URL that begins with depot after the server. The URL I might have expected Hudson to make that does work is:

     http://devtools2-v.austx.zilliant.com/browse/Zilliant_Perforce/userbranches/ulfertsm-main/main/policymgt/optimization/server/product/config/pricingDocumentDefinitions/optimization/EngineRecommendations.xml
    

    So is this something wrong with my configuration or with the plugin?

  13. Sep 16

    adrian says:

    Hi, Perforce is strongly being used in our build processes @ EA. I was able to c...

    Hi, Perforce is strongly being used in our build processes @ EA. I was able to configure the Perforce plugin in hudson but really need to be able to just sync a certain directory of the current workspace like in the Perforce front end. So multiple Hudson jobs would share a workspace but "filtering"it to just get a single unique directory.

    Could that be handled by adding some options to the p4.exe called by the client? (wrapping the call with another script for instance). If not where I could place this request?

    thanks 

  14. Oct 02

    Nicholas Folts says:

    I recently updated to Hudson 1.326 from 1.299... I also update to the latest per...

    I recently updated to Hudson 1.326 from 1.299... I also update to the latest perforce plugin, and now, although some projects work, others do not... In my catalina log I get the following error (over and over again):

    com.thoughtworks.xstream.converters.reflection.NonExistentFieldException: No such field hudson.plugins.perforce.PerforceSCM.nodeSuffix
            at com.thoughtworks.xstream.converters.reflection.FieldDictionary.field(FieldDictionary.java:106)
            at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldType(PureJavaReflectionProvider.java:152)
            at hudson.util.RobustReflectionConverter.determineType(RobustReflectionConverter.java:327)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:218)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at hudson.util.RobustReflectionConverter.unmarshallField(RobustReflectionConverter.java:262)
            at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:222)
            at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:173)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
            at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
            at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
            at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
            at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
            at hudson.util.XStream2.unmarshal(XStream2.java:67)
            at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
            at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
            at hudson.XmlFile.read(XmlFile.java:126)
            at hudson.model.Items.load(Items.java:106)
            at hudson.model.Hudson$9.call(Hudson.java:1995)
            at hudson.model.Hudson$9.call(Hudson.java:1988)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)
    Oct 2, 2009 12:03:00 PM hudson.util.RobustReflectionConverter doUnmarshal

    What do I need to do to make this work? Is there a newer version in the works?

  15. Oct 05

    Sri Bolle says:

    Information is showing lot of success stories of Perforce integration with Hudso...

    Information is showing lot of success stories of Perforce integration with Hudson but I have issues while setting up as Master/Slave configuration. I am getting following exception:

    [workspace] $ p4 workspace -o
    Caught Exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
    at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:324)
    at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
    at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:699)
    at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:295)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:973)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:400)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:349)
    at hudson.model.Run.run(Run.java:1120)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:123)

  16. Oct 12

    hanjun.ryu says:

    I'd find critical defect using linux master with linux slave ( Ubuntu 9.04 64bit...

    I'd find critical defect using linux master with linux slave ( Ubuntu 9.04 64bit ).
    Both of perforce version 1.0.13 & 1.0.14 has this problem when using perforce.hpi.
    ===========================================================================================================================
    Using shared perforce client: (my_client_workspace_name)
    Caught Exception communicating with perforce. No output for: p4 workspace -o (my_client_workspace_name) com.tek42.perforce.PerforceException: No output for: p4 workspace -o SE_SCM_TEST_USER_1
    at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:326)
    at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
    at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1417)
    at hudson.plugins.perforce.PerforceSCM.getWorkspaceFull(PerforceSCM.java:397)
    at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:343)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:978)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:421)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:370)
    at hudson.model.Run.run(Run.java:1120)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:123)
    =========================

  17. Oct 12

    hanjun.ryu says:

    ..
  18. Nov 10

    Julian Haslinger says:

    Hi! First of all, let me thank you for this nice plugin. However, there is...

    Hi!

    First of all, let me thank you for this nice plugin.

    However, there is one thing that doesn't work as expected: From time to time the plugin won't check out (e.g. get latest version) all the changed files in a directory.

    There are, for example, two files that have been changed in the latest submitted changelist:

    - file1.build

    - file2.vbs

    The perforce plugin, however, only detects the .build-file as being changed - the other file won't be checked out by the plugin at all!

    What can I do? Can you give me some advice or maybe some hints?

    Best Regards,

    Julian

    1. Feb 01

      Bobbi Newman says:

      Hi, We are seeing the same issue.  In our case the file that won't update ...

      Hi,

      We are seeing the same issue.  In our case the file that won't update is pom.xml.  A one-time force sync resolved the issue, but we are wondering about why it appears to be happening and what we can do to avoid it in the future.

      Any information would be greatly appreciated!

      Thanks,

      Bobbi

  19. Nov 20

    Ben Tomasini says:

    Hi, Thanks for this plugin.  When I try to congiure it, I get this below t...

    Hi,

    Thanks for this plugin.  When I try to congiure it, I get this below the workspace name:

    "Unable to check workspace against depot"

    When I run the job, this repeats over and over.  I have the depot working fine from my command line.
    Using master perforce client: btomasini-ws-hudson
    [workspace] $ p4 workspace -o btomasini-ws-hudson
    Caught Exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
    at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:324)
    at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
    at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:649)
    at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:260)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1005)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:431)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:378)
    at hudson.model.Run.run(Run.java:1176)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:123)

    1. Nov 24

      Pip says:

      I had the same issue, which was resolved by ensuring that perforce was in the sy...

      I had the same issue, which was resolved by ensuring that perforce was in the system path (ie you could run p4 from any command window - for some reason the P4 installer hadn't set this on my system) and ensuring that perforce had also set the P4PORT and P4CLIENT environment variables (ie ensure you have a default clientspec). Don't know which one it was. But Hudson no longer sits in an infinite p4 workspace -o loop for me.

  20. Jan 11

    Joris Geuens says:

    I've installed the latest version of Hudson in combination with the latest versi...

    I've installed the latest version of Hudson in combination with the latest version of the Perforce Plugin, but I can't getting it to work. This is my output :

    Started by user anonymous
    Using master perforce client: HUDSON-BUILD
    [workspace] $ p4 workspace -o HUDSON-BUILD
    Caught exception communicating with perforce. No output for: p4 workspace -o HUDSON-BUILD com.tek42.perforce.PerforceException: No output for: p4 workspace -o HUDSON-BUILD
        at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:322)
        at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
        at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:670)
        at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:293)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1013)
        at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:486)
        at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:412)
        at hudson.model.Run.run(Run.java:1179)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:122)
    Finished: FAILURE

    My environment is : Ubuntu Linux 8.04.3 - 64 bit / Hudson 1.3339 / Perforce plugin 1.0.16

    Also the configuration of a project gives problems : I always get the message "Unable to check workspace against depot", but my "p4" executable is available for all users on the system.

    1. Jan 13

      Peter Yamamoto says:

      try running the command that is failing yourself. You may see a perforce error m...

      try running the command that is failing yourself. You may see a perforce error message that indicate the problem. That's what happened to me the first time I setup a workspace/job (I can't remember what my error was but I know I figured it out from the p4 error message).

  21. Jan 14

    Levon Stepanian says:

    Where can I file a request for the Perforce plugin to provide a way to consume a...

    Where can I file a request for the Perforce plugin to provide a way to consume a Hudson property when specifying the View in the plugin GUI. In the current version (1.0.16), the Perforce View requires you to specify both the depot-location and local-workspace as such:

    //depot-location/... //local-workspace-view-of-depot

    I'd like to be able to define my own Hudson properties some.property and some.other.property, and have them consumed by the Perforce plugin:

    //some.property //some.other.property

    A colleague of mine mentioned there are other Hudson plugins which consume Hudson properties as I've described, and makes the Perforce plug-in a lot more robust.

    1. Jan 14

      oeuftete says:

      The Hudson JIRA (perforce component) would be where to raise this.

      The Hudson JIRA (perforce component) would be where to raise this.

  22. Jan 27

    Peter Yamamoto says:

    I used this on one mac without any issues. But when I tried on a second mac, set...

    I used this on one mac without any issues. But when I tried on a second mac, set up identically (afaict), when a build starts it just hangs. when I abort the build I see this call stack (interrupted by my abort):

    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:474)
    at hudson.slaves.WorkspaceList.acquire(WorkspaceList.java:173)
    at hudson.slaves.WorkspaceList.acquire(WorkspaceList.java:161)
    at hudson.slaves.WorkspaceList.allocate(WorkspaceList.java:129)
    at hudson.model.AbstractBuild$AbstractRunner.decideWorkspace(AbstractBuild.java:391)
    at hudson.model.FreeStyleBuild$RunnerImpl.decideWorkspace(FreeStyleBuild.java:56)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:405)
    at hudson.model.Run.run(Run.java:1198)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:122)

    I don't know how to start to debug this!? The perforce info was accepted (eg no red message about not being able to view/read the workspace).

    How can I get more info to debug? Is this a perforce plugin issue or a hudson issue (or combination?).

    Any help/suggestions appreciated.
    Peter

    1. Jan 28

      Peter Yamamoto says:

      I deleted the project, and afaik entered the same info/setup, but this time it w...

      I deleted the project, and afaik entered the same info/setup, but this time it worked!-P

  23. Jan 28

    Peter Yamamoto says:

    Feature request for Perforce plugin (where is the best place to post this?): "Ch...

    Feature request for Perforce plugin (where is the best place to post this?): "Changelist to sync to"

    I may take a stab at looking at the source, but for now, I'll request somebody else do this for me!-)

    Rather than a label (which some have reported doesn't work), I'd like to be able to manually specify a changelist number to be used for the sync and build. Seems like it would be close to the label option, hopefully somebody else would find this useful?

    Peter

  24. Jan 28

    Peter Yamamoto says:

    I used copy project to start a new project (workspace). It's a complete branch o...

    I used copy project to start a new project (workspace). It's a complete branch of an existing project so the only thing to change was the perforce workspace name. Everything seems to work but the perforce plugin section says that the workspace does not exist (even though it does). I'm wondering if this is because of creating the project via copy project or something?

    1. about 7 hours ago

      Haggai Philip Zagury says:

      Considering the fact Hudson can manage the workspace for you and you didn't have...

      Considering the fact Hudson can manage the workspace for you and you didn't have a pre-configured workspace for the protect during job configuration hudson displays an error.
      If it's the first time don't worry about it just make sure to have the "One Time Force Sync" chekcbox selected and you are good to go.

      Another option which seems the wrong way to go - is to use your P4 desktop client create a workspace and add it to hudson this will prevent the error message.

  25. Feb 05

    Clint Wong says:

    I am using Hudson 1.343 with the Perforce plugin 1.0.18, and the value for "Path...

    I am using Hudson 1.343 with the Perforce plugin 1.0.18, and the value for "Path to p4 executable" now requires "p4.exe" to be appended to the path.  Was this change intended?

  26. Feb 05

    Clint Wong says:

    Is there a way to make the plugin perform a force sync every time a build is sta...

    Is there a way to make the plugin perform a force sync every time a build is started?

  27. Feb 07

    Haggai Philip Zagury says:

    Enhancement wish / request I am using Perforce with multiple views whilst a cer...

    Enhancement wish / request

    I am using Perforce with multiple views whilst a certain area of the view has build related tools for example:
    //depot/Common/Infra/JEE/ver1.0/... //Infra-JEE-ver1.0-site/...
    //depot/Configuration/cm/... //Infra-JEE-ver1.0-site/cm/...

    If I change something in path: //depot/Configuration/cm/ all SCM triggered builds are queued for build is there a way to exclude changes by path e.g like in subversion plugin see example screenshot: