Jump to content

p4java changelist - get file when not already on local box

p4java jenkins changelist

  • Please log in to reply
1 reply to this topic

#1 karidrgn



  • Members
  • Pip
  • 9 posts

Posted 12 May 2014 - 06:20 PM

I've managed to get p4java to create a changelist and add a file in my local workspace. However, I would like it to do the same when running on a Jenkins slave using the Jenkins perforce plugin.

I've had a user / workspace defined in the perforce depot, but when I tried to use it either locally or when run in Jenkins I only got an empty changelist, which I assume is because the workspace doesn't actually exist on the box. What would be the best way to resolve this? When I've done a check out using the P4 gui and this workspace, it automatically retrieves the latest version to my local (creating the directory structure if needed) and lets me add it to a new changelist. What method do I need to get p4java to duplicate this manual process? :unsure: I've looked at getDepotFiles() which only gets a list, not the actual file.

#2 P4Matt


    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 13 May 2014 - 10:19 PM

I want to make sure I understand your goal; you are writing a P4Java based tool to add files to the depot and you want it to run on the Jenkins slave using the workspace that Jenkins creates and syncs?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users