问题
I've installed this p4 plugin in a Jenkins job. This scynces a workspace to the latest change and then builds. Now, under "Build Triggers", I've chosen "Build periodically" and set the job to run every 10 mins. Is there a way do trigger this Jenkins job when a new submit comes in to P4? Do I use the plugin or do I do something with "p4 trigger"? If so, how can I do this?
Thank you!
回答1:
Under the same Build Triggers
section, there is an option named Poll SCM
. Enable that option. This option is present by default when you install Jenkins. It does exactly what you're looking for. It will trigger build as soon as it detects a new commit in P4. Although not necessary, it's good to enable Quiet period
too. This option is under Advanced Project Options
section (refer snapshot below). Also read Help (?
) that's provided with every option to gain better understanding of what it does.

来源:https://stackoverflow.com/questions/25577959/how-to-trigger-a-jenkins-job-using-the-p4-plugin-or-p4