到目前为止,触发Jenkins构建工作可以创建新的请求请求,推动更改并留下评论,例如test this please,当我在GitHub中点击绿色的“合并请求请求”按钮时,我看不到Jenkins中正在运行任何作业。
test this please
我的工作设置
参考规格: +refs/pull/*:refs/remotes/origin/pr/*
+refs/pull/*:refs/remotes/origin/pr/*
分支说明符:origin/master或${sha1}
origin/master
${sha1}
参考了[GitHub pull request builder插件文档] [1]。
詹金斯原木
Jan 14, 2017 10:50:17 PM org.jenkinsci.plugins.ghprb.GhprbRootAction handleAction INFO: Checking PR #3 for Username/project Jan 14, 2017 10:50:17 PM org.jenkinsci.plugins.ghprb.GhprbTrigger handlePR INFO: Checking PR #3 for job Nation Jan 14, 2017 10:50:17 PM org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent INFO: Received PushEvent for https://github.com/Username/project Jan 14, 2017 10:50:17 PM org.jenkinsci.plugins.ghprb.GhprbRootAction handleAction WARNING: Request not known for event: push Jan 14, 2017 10:50:28 PM org.jenkinsci.plugins.ghprb.GhprbRootAction handleAction WARNING: Request not known for event: push Jan 14, 2017 10:50:28 PM org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent INFO: Received PushEvent for https://github.com/Username/project
GITHUB Web日志
日志1) 请求 X-GitHub-Event: pull_request 有效负载 .... "action": "closed" ...
X-GitHub-Event: pull_request
.... "action": "closed" ...
日志2) 请求 X-GitHub-Event: push 有效负载 .... "ref": "refs/heads/develop" ...
X-GitHub-Event: push
.... "ref": "refs/heads/develop" ...
日志3) 请求 X-GitHub-Event: push 有效负载 .... "ref": "refs/heads/feature/update-gitignore" ...
.... "ref": "refs/heads/feature/update-gitignore" ...
更新
我有Pull request,Issue comment并且Push在GitHub Webhook设置页面中启用了事件。
Pull request
Issue comment
Push
我必须创建两个不同的项目。一个用于拉取请求构建器,另一个用于拉取请求合并。
完整的示例/答案在此处:设置GitHub和Jenkins集成,以实现拉取请求生成器和合并
区别在项目要点13和14下进行了说明。14. Configure Jenkins project - Nation-Merge这解决了我的问题。
14. Configure Jenkins project - Nation-Merge
Refspec
origin/develop