简体   繁体   English

将构建状态从 Jenkins 通知到 Bitbucket Server

[英]Notify build status from Jenkins to Bitbucket Server

We have installed Jenkins v2.7.3 and Bitbucket Server v4.9.1 on premise and would like to send build status as notifications from Jenkins to Bitbucket Server.我们已经在本地安装了 Jenkins v2.7.3 和 Bitbucket Server v4.9.1,并希望将构建状态作为通知从 Jenkins 发送到 Bitbucket Server。

So far I have only found solutions (1 and 2) for Bitbucket Cloud, but nothing for Bitbucket Server.到目前为止,我只找到了 Bitbucket Cloud 的解决方案(1 和 2),但没有找到 Bitbucket Server 的解决方案。 Any tip on how to make this happen?关于如何做到这一点的任何提示?

  1. https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+Cloud+Build+Status+Notifier+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+Cloud+Build+Status+Notifier+Plugin
  2. https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+OAuth+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+OAuth+Plugin

You might get some use out of the stash plugin as BitBucket is based on Stash code .您可能会从stash 插件中获得一些用途,因为BitBucket 基于 Stash 代码

What Atlassian had to say: Atlassian 不得不说:

We have unified our Git products under the Bitbucket name. With
Bitbucket, now you have a range of options that can be adopted by teams
of all sizes and requirements: Bitbucket Cloud (previously known as
Bitbucket), Bitbucket Server (previously known as Stash) and Bitbucket
Data Center (previously known as Stash Data Center). 

About the plugin:关于插件:

This plugin notifies an Atlassian Stash instance of Jenkins builds in
progress and of their results. The build results will show up in the
commit list in Stash or in a Stash pull request and provide immediate
and easy to scan feedback about a commit. It is possible to navigate 
from build result information in Stash directly to the build in 
question. The plugin can be configured on a per-job basis, globally 
for all Jobs or both to minimize the configuration overhead.

You need Stash Pull Request Builder Plugin This Jenkins plugin builds pull requests from an Atlassian Stash server and will report the test results as a comment.您需要 Stash Pull Request Builder Plugin 这个 Jenkins 插件从 Atlassian Stash 服务器构建拉取请求,并将测试结果报告为评论。 This plugin was inspired by the GitHub & BitBucket pull request builder plugins这个插件的灵感来自 GitHub 和 BitBucket 拉取请求构建器插件

https://plugins.jenkins.io/stash-pullrequest-builder https://plugins.jenkins.io/stash-pullrequest-builder

在此处输入图片说明

最新版本的 Stash Notifier 插件现在适用于 Job DSL

Build status can be posted seamlessly from Jenkins's Bitbucket server integration plugin .构建状态可以从 Jenkins 的Bitbucket 服务器集成插件无缝发布。 This plugin is created and maintained by Atlassian.该插件由 Atlassian 创建和维护。

However, You will have to upgrade the Bitbucket server from v4.9.1 to at least v5.6.但是,您必须将 Bitbucket 服务器从 v4.9.1 升级到至少 v5.6。 Preferably to v7.4+ to make use of new build functionality within Bitbucket Server.最好使用 v7.4+ 以利用 Bitbucket Server 中的新构建功能

Bitbucket Server Notifier plugin for Jenkins did the job for me (Jenkins integration with Bitbucket Server - formerly known as Stash). Jenkins 的Bitbucket Server Notifier插件为我完成了这项工作(Jenkins 与 Bitbucket Server 集成 - 以前称为 Stash)。

https://plugins.jenkins.io/stashNotifier/#documentation Usage: https://github.com/jenkinsci/stashnotifier-plugin/blob/release/1.x/readme.md https://plugins.jenkins.io/stashNotifier/#documentation用法: https : //github.com/jenkinsci/stashnotifier-plugin/blob/release/1.x/readme.md

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM