正如 gezzed 在他的评论中已经指出的,与此同时,有一个很好的解决方案(《
轮询必须消亡:从Git钩子触发Jenkins构建》中 描述):
将Jenkins作业的构建触发器设置为 Poll SCM ,但 不 指定时间表。
创建GitHub后接收触发器以通知URL
http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository>?token=<get token from git to build remotely>
这将触发所有轮询指定Git存储库的构建。
但是,轮询实际上检查是否已将任何内容推送到使用的分支。
它完美地工作。



