Jenkins github pull请求构建器插件未发布到github

时间:2013-11-22 05:17:58

标签: github jenkins jenkins-plugins pull-request

我已经配置了Jenkins Github Pull-Request构建器插件来构建我所在机构成员提出的每个请求。它就像一个魅力。

但是,构建不会将构建状态报告回github,就像它在这个不错的post中所显示的那样。我还尝试选中“在更新提交状态失败时使用注释来报告结果”复选框,但我仍然无法回复github。

我在GitHub上创建了一个bot用户,并赋予它对repo的推送和管理权限。

我的Jenkins服务器位于防火墙之后,但由于它正常构建并检测到(通过轮询)对github存储库的更改,我认为这不是问题。

其他人有这个问题吗?你是怎么解决的?

这是我的控制台输出的转储(为了便于阅读而压缩)

Started by an SCM change
Building in workspace 
Fetching changes from the remote Git repository
Fetching upstream changes from repo
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen branch in repository origin/pr/1/head
Seen branch in repository origin/pr/1/merge
Seen branch in repository origin/pr/10/head
[…]
Seen branch in repository origin/pr/9/head
Seen branch in repository origin/pr/9/merge
Seen 33 remote branches
Checking out Revision 9b4d45ee3a2d265a1268c2931e7b2bcb738e1c87 (origin/pr/16/merge)
First time build. Skipping changelog.
...found 160 targets...
...updating 21 targets...
**passed** test/bin/test.test/gcc-4.8.1/debug/test.test
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing BoostTest-1.x (default)
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to SUCCESS
[xUnit] [INFO] - Stopping recording.
Finished: SUCCESS

1 个答案:

答案 0 :(得分:15)

在看了Jenkins LOGS后,我学到了一些东西:

  1. 此插件(github pull-request builder)完全替换所有其他构建触发器(包括git和SCM poll)。我正在使用这三个,当我认为这个插件正在工作因为它正确构建时,实际上是其他触发器。
  2. 必须在github插件上设置您的项目github网址。这个插件取决于github插件工作。这是阻止它在我的配置中工作的原因。
  3. 修复#2后,可以从SCM Poll和Git中删除触发器,以确保pull-request插件触发构建。当它发生时,它实际上为Jenkins中的活动源添加拉动请求的链接(非常好)并正确更新github上的状态。