Bitbucket拉取请求构建器插件不断触发相同的提交构建 [英] Bitbucket pull request builder plugin keeps triggering same commit build

查看:156
本文介绍了Bitbucket拉取请求构建器插件不断触发相同的提交构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将Bitbucket与Jenkins集成.这样,只要打开PR,它就会触发Jenkins的构建.然后,PR中最后一次提交的提交状态将更新为失败或成功,并且该提交不会再次触发构建. (这在Github上效果很好,但在Bitbucket看来对我来说就像一场噩梦)

I need to integrate Bitbucket with Jenkins. So that whenever a PR is opened it will trigger a build in Jenkins. Then commit status of the last commit in the PR will be updated as failed or success and this commit wont trigger the build again. (This works beautiful with Github but seems to be a nightmare for me with Bitbucket)

到目前为止,我做到了:

问题

  1. 针对相同的PR/commit一遍又一遍地触发构建
  2. 提交状态不会在位桶上更新

让我知道是否可以提供更多信息.

Let me know if I can provide more information.

推荐答案

在我的情况下,Jenkins URL设置为http://jenkins:8080,并且当这样的URL通过其API发送到BitBucket时,BitBucket返回错误无效的URL". (查看Jenkins日志:http://yourjenkins:8080/log/all)这不是由BitBucket Pull Request Builder插件处理的,因此由于认为构建未进行,因此不断重建所有我们的Pull Request.将Jenkins URL设置为http://jenkins.domain.tld:8080/http:///jenkins之后,BitBucket API开始接受该URL,一切开始正常工作.

In my case, the Jenkins URL was set to http://jenkins:8080 and when such a URL was sent to BitBucket via their API, BitBucket returned the error "Invalid URL" (Look in Jenkins Logs: http://yourjenkins:8080/log/all) Which is not handled by the BitBucket Pull Request Builder plugin and thus kept continuously rebuilding all of our pull requests because it thought that build was not in progress. After setting Jenkins URL to http://jenkins.domain.tld:8080/ or http:///jenkins, the BitBucket API started accepting the URL and everything started to work.

但是在您的情况下,可能是其他一些错误引起的.您可以检查您的Jenkins错误日志以查看失败.

But in your case it may be possible that some other error is the cause. You can check your Jenkins Error log to see the failure.

请参阅以下问题:构建状态通知失败,并输入有效的URL

这篇关于Bitbucket拉取请求构建器插件不断触发相同的提交构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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