简体   繁体   English

Jenkins 在推送后没有构建,但 Github webhook 正在运行

[英]Jenkins not building after push, but Github webhook is working

I think I've done the hard part already: the Github webhook after a push always returns a success message.我想我已经完成了困难的部分:推送后的 Github webhook 总是返回成功消息。

I can build manually.我可以手动构建。 But it never builds after the push, because "polling" never happens.但它永远不会在推送后构建,因为“轮询”永远不会发生。

Both the GitHub Hook Log and Git Polling Log say "Polling has not yet run". GitHub 挂钩日志和 Git 轮询日志都说“轮询尚未运行”。

Here is my configuration:这是我的配置:

  • Branches to build: refs/heads/checkJenkins要构建的分支:refs/heads/checkJenkins
  • Build Triggers: GitHub hook trigger for GITScm polling, Poll SCM构建触发器:用于 GITScm 轮询、轮询 SCM 的 GitHub 钩子触发器
  • Build: Execute shell: 'git pull'构建:执行shell:'git pull'

Any ideas on how to get the polling started?关于如何开始投票的任何想法?

A side question: which should be doing the polling when I'm using the webhook in github: the "GITScm polling" or "Poll SCM"?一个附带问题:当我在 github 中使用 webhook 时,哪个应该进行轮询:“GITScm polling”还是“Poll SCM”? Can I delete one of those settings?我可以删除其中一项设置吗?

触发器和构建

Poll SCM is to scan the repository for changes at regular intervals as specified by the cron under Schedule . Poll SCM将按照Schedule下的 cron 指定的时间间隔定期扫描存储库中的更改。 So this option is redundant.所以这个选项是多余的。

Now coming to the hook, is it configured to deliver everything or just the push event?现在来到钩子,它是否配置为交付所有内容或仅推送事件? You can hit http://<jenkins_url>/log/all in your browser to see the system log while pushing changes.您可以在浏览器中点击http://<jenkins_url>/log/all以在推送更改时查看系统日志。 Towards the bottom of this log, see if Jenkins has received the hook and poked the job.在这个日志的底部,看看 Jenkins 是否收到了钩子并戳了这份工作。 If the hook is not received, reconfigure it at GitHub to send the appropriate events.如果未收到挂钩,请在 GitHub 上重新配置它以发送适当的事件。 Else, delete and recreate the job as sometimes Jenkins fails to register a new job to poke on receiving events and at other times a new job itself doesn't respond to poking.否则,删除并重新创建作业,因为有时 Jenkins 无法注册新作业来戳接收事件,而有时新作业本身不会响应戳。

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

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