Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger a Jenkins build on a Perforce submit

I am using Jenkins with Perforce. I have downloaded the P4 Plugin, and I have read over the documentation but I am still a bit confused. In my Jenkins project, I have the build trigger set to "Perforce triggered build". I'm assuming that means I need to add a trigger to Perforce that tells Jenkins to run a build, but I have no idea on how to do that.

I have not been able to find any documentation on how to implement a trigger from Perforce to notify Jenkins it needs to run. I can find documentation from Perforce on how to setup basic triggers, but I can not find anything from Jenkins on how to set up the actual connection to trigger builds on Perforce submits.

On the "Changes" tab in Jenkins, I am able to see the what was submitted to Perforce, so I know that Perforce and Jenkins are at least communicating. Initially, I thought that Jenkins would just automatically run the build on a Perforce submit, if I had "Perforce triggered build" checked, but that doesn't seem to be the case.

So my questions are:

Am I correct in assuming that I need to manually create a trigger to be added to Perforce?

If so, does anyone know of any documentation or examples that I can look to as a guide?

like image 229
KSF Avatar asked Feb 14 '17 18:02

KSF


People also ask

How do you trigger a build in Jenkins?

Create a remote Jenkins build trigger in three stepsCreate a Jenkins build job and enable the Trigger builds remotely checkbox. Provide an authentication token; This can be any text string of your choice. Invoke the Jenkins build URL to remotely trigger the build job.


1 Answers

Yes, you need to add a trigger to Perforce. It's well documented here.

like image 168
Jon S Avatar answered Oct 14 '22 09:10

Jon S