BitBucket Jenkins不会自动生成 [英] BitBucket Jenkins doesn't automatically build
问题描述
在我的Jenkins上,我配置了:
On my Jenkins I configured:
源代码管理
Git存储库: https://bitbucket.org/username/project.git
凭据:用户名/密码
构建器触发器
将更改推送到BitBucket时构建
Build when a change is pushed to BitBucket
在我的BitBucket Webhooks上:
On my BitBucket Webhooks:
http://Jenkins.URL:8080/bitbucket-hook
我尝试对.txt文件进行小的更改,但Jenken不会自动生成.如果我手动单击立即构建",则显示成功.
I tried pushing a small change to a .txt file, but the Jenken doesn't build automatically. If I manually click "build now", it shows success.
可能是什么问题?
在bitbucket存储库中,该项目很简单.我只有一个文本文件要测试.我认为只要对文本文件进行任何更改,它都应该触发Jenkins构建.
In the bitbucket repository, the project is simple. I just have a text file to test. I think as long as I made any change to the text file, it should trigger a Jenkins build.
在Jenkins的系统日志中,它显示轮询尚未运行".但是在Bitbucket Webhook请求日志中,我可以看到所有请求.
In the System Log of Jenkins, it shows "Polling has not run yet.". But in Bitbucket Webhook request log, I can see all the requests.
推荐答案
如@Adrian所述,您仍然需要选择轮询SCM".这有点不直观,但是当BitBucket Webhook向Jenkins发送请求时,Jenkins将轮询所有引用了所做更改的BitBucket存储库的作业的更改.您可以为轮询设置较长的时间间隔,例如@monthly,因为您不需要詹金斯的计划来触发轮询;进行更改后,web挂钩将立即处理该问题.
As @Adrian mentioned, you still need to select "Poll SCM". It's a little unintuitive, but when the BitBucket webhook sends a request to Jenkins, Jenkins will poll for changes on all jobs that reference the BitBucket repo where the change was made. You can set a long time interval for the poll, e.g. @monthly, as you don't need Jenkins' scheduling to trigger polling; the web hook will take care of that as soon as a change is made.
这篇关于BitBucket Jenkins不会自动生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!