我们使用Jenkins(1.614)并使用Git作为版本控制工具。 Git插件版本是2.3.5。我试图在每次签到后触发构建 ,因为持续轮询太昂贵了。我尝试了各种链接中描述的以下方法,但它不起作用:
curl http://jenkins_url:9099/jenkins/git/notifyCommit?url=ssh://gitolite@git_server/TestRepo

$ git push origin release-test
Counting objects: 20, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 308 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Commit ID: 3a9cddadasd
remote: Returning result 0
remote: % Total % Received % Xferd Average Speed Time Time Time Current
remote: Dload Upload Total Spent Left Speed
remote: 124 124 124 124 0 0 30 0 0:00:04 0:00:04 --:--:-- 497
remote: Scheduled polling of Poll_Job
remote: No Git consumers using SCM API plugin for: ssh://gitolite@git_server/TestRepo

Started on Jun 10, 2015 6:42:04 PM
No existing build. Scheduling a new one.
Done. Took 0 ms
Changes found

我确实看到构建#在每次这样的民意调查后增加了几秒钟,但是“构建历史记录”#39;保持空白,如下所示。不执行构建过程中的任何步骤。
为什么构建没有按预期触发的任何输入?
答案 0 :(得分:1)
查看构建" Git轮询日志",它可能表示问题。我有类似的问题,其中Maven通过" Poll SCM"来自Git,停止了触发新版本。显然原因是:
错误:无法记录SCM轮询... 未定义的方法`add'为零:NilClass 在Jenkins :: Model :: Build.initialize(C:/ Jenkins / plugins / nodeofflinenotification / ...
然后我注意到了#34; Node Offline Notification Plugin"不推荐使用,因此我将其卸载(并安装了" Mail Watcher Plugin"相反),并且SCM轮询再次工作。