How to automate the changing of P4 client specs on a Jenkins build process for multiple build jobs?

30 Views Asked by At

Context:

  • One machine that uses Jenkins as a DOS-Jenkins service (not a Windows service).
  • Source-Code Management is handled using a Perforce plugin.
  • There is another job on the same machine that uses the Perforce plugin to sync files but from a different Perforce server.

Problem:

  • The first task in the build process is a Windows-batch command that performs a force sync of a particular file.
p4 sync -f //depot/directory1/BuildVersion.cs
  • However, the console output displays the following message:
C:\Users\<username>\.jenkins\workspace\<workspace_name>>p4 sync -f //depot/directory1/BuildVersion.cs 
//depot/directory1/BuildVersion.cs - must refer to client '<clientname>'.

C:\Users\<username>\.jenkins\workspace\<workspace_name>>exit 1 
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

Steps to try and address this issue:

  • I have tried following the advice in the documentation, which can be found here, or alternatively, see the image below -- to no avail, possibly because I'm not understanding it. P4 build farm configuration

  • I have tried adjusting both build processes manually so that the p4 config client specification matches their respective build configurations -- however, the console outputs the same error message.

There is obviously a conflict with the P4 configurations conflicting with one another, and I would appreciate a solution that allows for both build processes to work with different P4 configurations using a DOS-Jenkins infrastructure.

0

There are 0 best solutions below