我如何让Jenkins构建推送到BitBucket git存储库? [英] How do I get Jenkins to build on push to a BitBucket git repository?
问题描述
我有一个托管在BitBucket上的git存储库,并且已经在存储库和我的Jenkins服务器之间建立了SSH验证。我可以手动构建Jenkins,但无法获得BitBucket上的Jenkins服务来触发构建。
Jenkins配置:
- 项目名称:[my_jenkins_job]
- 构建触发器:
- 触发器构建远程:
---令牌:[令牌]
BitBucket配置:
- 端点:http:// [my_jenkins_address] / job / [my_jenkins_job] / build(我也尝试过build?token = [token])
- Project Name:[my_jenkins_job]
- 模块名称:[blank]
- 令牌:[令牌]
访问 http :// {my_jenkins_address}
/作业/ {my_jenkins_job}
/建立令牌= {?令牌}
正确启动构建。
为什么不推动对BitBucket的更改会导致Jenkins启动构建?
我有我们的Jenkins实例设置为每分钟轮询存储库。这是不是你的需求不够频繁?
我们的Jenkins配置:
构建触发器>调查SCM =检查
构建触发器>调查SCM>计划=
#每1分钟
* / 1 * * * *
I have a git repository hosted on BitBucket, and have set up SSH authentication between the repository and my Jenkins server. I can build on Jenkins manually, but cannot get the Jenkins service on BitBucket to trigger builds.
Jenkins configuration:
- Project Name: [my_jenkins_job]
- Build Triggers:
--Trigger Builds Remotely:
---Token: [token]
BitBucket configuration:
- Endpoint: http://[my_jenkins_address]/job/[my_jenkins_job]/build (I've also tried build?token=[token])
- Project Name: [my_jenkins_job]
- Module Name: [blank]
- Token: [token]
Visiting http://{my_jenkins_address}
/job/{my_jenkins_job}
/build?token={token}
kicks off a build properly.
Why doesn't pushing a change to BitBucket cause Jenkins to initiate a build?
I have our Jenkins instance set up to poll the repository every minute. Is that not frequent enough for your needs?
Our Jenkins configuration:
Build Triggers > Poll SCM = Checked
Build Triggers > Poll SCM > Schedule =
# every 1 minute
*/1 * * * *
这篇关于我如何让Jenkins构建推送到BitBucket git存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!