Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins和Github与forked pr提交_Github_Jenkins_Continuous Integration_Git Fork - Fatal编程技术网

Jenkins和Github与forked pr提交

Jenkins和Github与forked pr提交,github,jenkins,continuous-integration,git-fork,Github,Jenkins,Continuous Integration,Git Fork,我在设置Github和Jenkins CI时遇到问题 当forked PR提交更改时,github不会通知jenkins,即使我已接受forked repo的PR。只有当我将分叉回购的pr合并到master中时,github才会触发Jenkins 因此,凭证和功能都在那里,但我在github中找不到强制所有对原始回购的提交(包括forked pr)触发CI的选项,有人有任何建议吗?A将向任何侦听服务发布任何收到的提交。 它并不局限于一个特定的分支 但是,可以将Jenkins设置为监视特定分支。

我在设置Github和Jenkins CI时遇到问题

当forked PR提交更改时,github不会通知jenkins,即使我已接受forked repo的PR。只有当我将分叉回购的pr合并到master中时,github才会触发Jenkins

因此,凭证和功能都在那里,但我在github中找不到强制所有对原始回购的提交(包括forked pr)触发CI的选项,有人有任何建议吗?

A将向任何侦听服务发布任何收到的提交。
它并不局限于一个特定的分支

但是,可以将Jenkins设置为监视特定分支。
除非,如“”中所述,您将Jenkins CI配置为从GitHub轮询(在这种情况下,它将侦听所述GitHub钩子,而不是对特定分支执行git拉动。

s提到的是另一种让Jenkins poll GitHub的方法。

解决方案是使用

上面的链接中有一些对我有用的说明。以及我必须执行此操作的默认说明:

"This build is parameterized" and add string parameter named "sha1". When starting build give the "sha1" parameter commit id you want to build or refname (eg: "origin/pr/9/head").

我没有使用github钩子。你使用了我在之前推荐的轮询方法。应该注意的是,使用github Pull Request Builder插件不会强制你使用轮询。钩子也可以使用。如果你允许它自动创建钩子,请转到你的github帐户,并确保在钩子下在回调URL是正确的,我一开始就被这个问题缠住了…这些插件的文档真的很糟糕