简体   繁体   English

如何在Perforce提交上触发Jenkins构建

[英]How to trigger a Jenkins build on a Perforce submit

I am using Jenkins with Perforce. 我在Perforce中使用Jenkins。 I have downloaded the P4 Plugin , and I have read over the documentation but I am still a bit confused. 我已经下载了P4插件 ,我已经阅读了文档,但我仍然有点困惑。 In my Jenkins project, I have the build trigger set to "Perforce triggered build". 在我的Jenkins项目中,我将构建触发器设置为“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. 我假设这意味着我需要向Perforce添加一个触发器,告诉Jenkins运行构建,但我不知道如何做到这一点。

I have not been able to find any documentation on how to implement a trigger from Perforce to notify Jenkins it needs to run. 我无法找到任何关于如何从Perforce实现触发器以通知Jenkins需要运行的文档。 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. 我可以从Perforce找到有关如何设置基本触发器的文档,但是我找不到Jenkins关于如何设置实际连接以触发Perforce提交的构建的任何内容。

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. 在Jenkins的“更改”选项卡中,我能够看到提交给Perforce的内容,因此我知道Perforce和Jenkins至少在沟通。 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. 最初,我认为如果我检查了“Perforce触发构建”,Jenkins会自动在Perforce提交上自动运行构建,但情况似乎并非如此。

So my questions are: 所以我的问题是:

Am I correct in assuming that I need to manually create a trigger to be added to Perforce? 假设我需要手动创建要添加到Perforce的触发器,我是否正确?

If so, does anyone know of any documentation or examples that I can look to as a guide? 如果是这样,有没有人知道我可以作为指南的任何文档或示例?

Yes, you need to add a trigger to Perforce. 是的,您需要为Perforce添加触发器。 It's well documented here. 这里有很好的记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM