Question

I would like to use Jenkins to copy newly commited code from Perforce to a Dev Server. When the project is run in Jenkins it will detect all changes in Perforce workspace and build+deploy code to specific server.

I am using Jenkins on Windows box.

I have installed Jenkins and the Perforce plugin on Windows 7 laptop currently for testing/trying.

The configurations have all been setup, In Configure System - > Perforce -> Path to Perforce exe is set to C:\Program Files\Perforce\p4v.exe, which is the right path.

In the project under Source Code Management -> Perforce I have setup hostname:port, username and password, workspace, client view type to View Map with location.

When I try to build the project I get an exception:

Started by user anonymous
Building in workspace <http://localhost:8080/job/Test3/ws/>
Using master perforce client: Jenkins_Test [workspace] $ "C:\Program Files\Perforce    \p4v.exe" workspace -o Jenkins_Test Caught exception communicating with perforce. No     output for: C:\Program Files\Perforce\p4v.exe workspace -o Jenkins_Test     com.tek42.perforce.PerforceException: No output for: C:\Program Files\Perforce\p4v.exe     workspace -o Jenkins_Test at     com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTempl    ate.java:408) at     com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTempl    ate.java:301)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1615)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1576)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:892)
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:1688)
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. No output for: C:\Program Files\Perforce\p4v.exe workspace -o Jenkins_Test 

What is wrong and how do I accomplish my goals (Jenkins will detect all changes in Perforce and build+deploy code to specific server.)?

Was it helpful?

Solution

You said that "Path to Perforce exe is set to C:\Program Files\Perforce\p4v.exe".

p4v.exe is the GUI tool for Perforce.

You probably want the command line tool for Perforce, which is 'p4.exe'.

See if you have 'p4.exe' in the same directory, and change your configuration to point to p4.exe instead of p4v.exe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top