gpt4 book ai didi

jenkins - 如何让 Jenkins 构建将故障报告回 Bitbucket 服务器?

转载 作者:行者123 更新时间:2023-12-02 04:31:20 24 4
gpt4 key购买 nike

我的工作是运行 Jenkins 和 Bitbucket Server(因此,他们托管自己的 bitbucket 版本,而不是 bitbucket 云)。我习惯于在 github 和 bitbucket 云上进行通过/失败的构建,并立即向 PR 和分支报告构建是否通过或失败。我想在当前环境下将这份礼物送给我的团队。如何在 Bitbucket 服务器中获取 PR 以接收 Jenkins 构建的成功/失败信息?

<小时/>

[图 1 只是显示了我想要的功能示例,可在 github+codeship 中的 PR 上运行]

<小时/>

PR with build success and failures on github and codeship

最佳答案

Webhook to Jenkins for Bitbucket可以帮助通知 Jenkins 在有提交时进行轮询,您仍然需要注意 “lazy ref updates” in Bitbucket (描述in this thread)

We had to implement something that would do a get to the REST API for the pull-request/*/changes before the call to the Jenkins /git/notifyCommit url.

最后一个 Jenkins URL /git/notifyCommit 来自 Jenkins Git plugin .

查看更多信息“Configuring Webhook To Jenkins for Bitbucket”。

一旦 Jenkins 被正确调用,您就可以如“Notify build status from Jenkins to Bitbucket Server”中所述,使用“Jenkins Stash Pullrequest Builder”,来自 nemccarthy/stash-pullrequest-builder-plugin .

http://blog.nemccarthy.me/wp-content/uploads/2015/03/Screen-Shot-2015-03-23-at-11.08.56-am.png

关于jenkins - 如何让 Jenkins 构建将故障报告回 Bitbucket 服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49409361/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com