如何正确将 Bitbucket 连接到 Jenkins [英] How to connect Bitbucket to Jenkins properly
问题描述
大约 1 周后,Bitbucket 不再(?)向我的 Jenkins 服务器发送请求.
我是这样设置的:
端点
http://username:apitoken@jenkinshost/
username
= Jenkins 中的用户名apitoken
= apitoken 连接到 Jenkins 中的用户名jenkinshost
= 我运行 Jenkins 的主机
项目名称
是一个项目Token
:我可以在每个项目配置中设置的令牌.
我根据这个网站做了这个:.
只有一件事需要注意:创建 POST Hook 时(注意它是 POST 钩子,而不是 Jenkins 钩子),当 URL 最后有一个/"时,它可以工作.喜欢:
URL: JENKINS_URL/bitbucket-hook/例如someAddress:8080/bitbucket-hook/
不要忘记在您的作业配置中选中将更改推送到 Bitbucket 时构建".
Since about 1 week now, Bitbucket doesn't (?) send a request to my Jenkins server.
I've set it all up like this:
Endpoint
http://username:apitoken@jenkinshost/
username
= username in Jenkins
apitoken
= apitoken connected to the username in Jenkins
jenkinshost
= my host where I run Jenkins
Project name
is a project
Token
: The token I can setup in the per-project configuration.
I've done this according to this website: http://felixleong.com/blog/2012/02/hooking-bitbucket-up-with-jenkins
.
It did work, but it doesn't anymore. Did Bitbucket change something? How can I fix this?
In order to build your repo after new commits, use Bitbucket Plugin.
There is just one thing to notice: When creating a POST Hook (notice that it is POST hook, not Jenkins hook), the URL works when it has a "/" in the end. Like:
URL: JENKINS_URL/bitbucket-hook/
e.g. someAddress:8080/bitbucket-hook/
Do not forget to check "Build when a change is pushed to Bitbucket" in your job configuration.
这篇关于如何正确将 Bitbucket 连接到 Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!