我已经配置了 Jenkins Github 拉取请求构建器插件来构建我机构成员提出的每个拉取请求。它就像一个魅力。
但是,构建并没有像在这个不错的 post 中显示的那样将构建状态报告回 github。 .我还尝试选中“更新提交状态失败时使用评论报告结果”框,但我仍然没有在 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
最佳答案
在查看 Jenkins LOGS 后,我学到了一些东西:
修复 #2 后,您可以从 SCM Poll 和 Git 中删除触发器,以确保 pull-request 插件正在触发构建。当它这样做时,它实际上将拉取请求的链接添加到 Jenkins 中的事件提要(非常好)并正确更新 github 上的状态。
关于github - Jenkins github 拉取请求构建器插件未发布到 github,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20137528/