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

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

问题描述

现在大约1周后,Bitbucket不会向我的Jenkins服务器发送请求。



我已经设置了所有这样: / p>

端点 http:// username:apitoken @ jenkinshost /

用户名 = Jenkins中的用户名

apitoken = apitoken已连接到Jenkins的用户名

jenkinshost =我运行Jenkins的主机



项目名称是一个项目

令牌:可以在每个项目配置中设置的令牌。



我已根据此网站完成此操作:。



只有一件事要注意:
当创建一个POST Hook(注意它是POST钩子,而不是Jenkins钩子),当它有一个/在结尾的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天全站免登陆