如何正确将 Bitbucket 连接到 Jenkins [英] How to connect Bitbucket to Jenkins properly

查看:59
本文介绍了如何正确将 Bitbucket 连接到 Jenkins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大约 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆