how to use perforce triggered build in jenkins
Using the Jenkins Perforce Plugin you will be able configure a Jenkins job with a Perforce Client.
In a new freestyle job you will havethe options:
- Advanced Project Options in which you can specify a custom workspace. This is the folder where the P4 Plugin will sync your client. (which can then be referenced later using the WORKSPACE variable)
- Source Code Management in which you can configure the Perforce client to use, and how to use it.
- Build Triggers in which you can choose when you want the build. "Poll SCM" polls your Perforce client for any changes made according to the time parameters you specify (H/5 H(0-19) * * * will check every 5 mins from 12:00 to 19:59), while, I believe, "Build Periodically" will trigger the build according to a schedule. (0 H(20) * * * will trigger a build every evening at 20:00)
I believe it's bad practice on Jenkins to force a job to run at a specific time because Jenkins uses HASH values to try and distribute load on its servers, so a better schedule would be (H H(20) * * *) as this would allow the Jenkins master to trigger the build somewhere between 20:00 and 20:59. The specific times are not random, but are generated internally from the job name