I am trying the get Jenkins configured with Perforce so I can automate my junit tests build automatically.

See screen shot for my configuration. enter image description here

This is Perforce Install Configuration: enter image description here

But I get an exception:

Building in workspace <http://host:8080/job/Critical%20Events%20Tool/ws/>
Using master perforce client: FRA_Jenkins_CriticalTool [workspace] $ "C:\Program     Files\Perforce\p4.exe" workspace -o FRA_Jenkins_CriticalTool [workspace] $ "C:\Program Files\Perforce\p4.exe" login -a -p [workspace] $ "C:\Program Files\Perforce\p4.exe" -P AEA1F4274926EC4525326163DF42D5A4 workspace -o FRA_Jenkins_CriticalTool Changing P4 Client Root to: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Changing P4 Client View from:
-//something/... //FRA_Jenkins_CriticalTool/...
//something/PPS/... //FRA_Jenkins_CriticalTool/PPS/...
-//something/* //FRA_Jenkins_CriticalTool/*

Changing P4 Client View to: 
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/
Saving modified client FRA_Jenkins_CriticalTool [workspace] $ "C:\Program Files\Perforce\p4.exe" -P AEA1F4274926EC4525326163DF42D5A4 -s client -i Caught exception communicating with perforce.  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'

For Command: C:\Program Files\Perforce\p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i With Data:

Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/


===================
com.tek42.perforce.PerforceException:  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'.
For Command: C:\Program Files\Perforce\p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i 
With Data:
===================
Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/


===================

at com.tek42.perforce.parse.AbstractPerforceTemplate.saveToPerforce(AbstractPerforceTemplate.java:270)
at com.tek42.perforce.parse.Workspaces.saveWorkspace(Workspaces.java:77)
at hudson.plugins.perforce.PerforceSCM.saveWorkspaceIfDirty(PerforceSCM.java:1790)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:895)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1320)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
at hudson.model.Run.execute(Run.java:1700)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
ERROR: Unable to communicate with perforce.  Error in client specification. Error detected at line 9. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'. Null directory (//) not allowed in '//something/PPS/CriticalEventTool/'.
For Command: C:\Program Files\Perforce\p4.exe -P AEA1F4274926EC4525326163DF42D5A4 -s client -i 
With Data
===================
Client: FRA_Jenkins_CriticalTool
Owner: user1
Description: Created by user1.
Root: <http://localhost:8080/job/Critical%20Events%20Tool/ws/>
Options: noallwrite clobber nocompress unlocked nomodtime rmdir
SubmitOptions: submitunchanged
LineEnd: local
View:
  //something/PPS/CriticalEventTool/ //FRA_Jenkins_CriticalTool/PPS/CriticalEventTool/

Whats wrong and How can I automate my junit tests build automatically?

有帮助吗?

解决方案

I believe you just need to add "..." at the end of your ViewMap, so that it reads //something/PPS/CriticalEventTool/...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top