简体   繁体   English

jenkins 中带有 bitbucket 构建状态通知程序插件的多分支管道

[英]Multi branch pipeline with bitbucket build status notifier plugin in jenkins

I have a multi branch pipeline job in my jenkins server and I tried to notify the build status using bitbucket cloud build status notifier plugin.我的 jenkins 服务器中有一个多分支管道作业,我尝试使用 bitbucket 云构建状态通知程序插件通知构建状态。

I configured the settings provided in notifier plugin and added the notifier script function in the beginning and end of my Jenkinsfile.我配置了通知程序插件中提供的设置,并在我的 Jenkinsfile 的开头和结尾添加了通知程序脚本功能。

Jenkinsfile:詹金斯档案:

node {
    stage 'Build'
        bitbucketStatusNotify ( buildState: 'INPROGRESS' )
        .......
        .......
        bitbucketStatusNotify ( buildState: 'SUCESS' )
}

When I run the jenkins build it trigger the notifier script and return done statement in the console.当我运行 jenkins build 时,它会触发通知程序脚本并在控制台中返回 done 语句。

Entering stage Build
Proceeding
[Pipeline] bitbucketStatusNotify
Sending build status INPROGRESS for commit 84bf788cc9ccc8c31df5719da383cab003c97582 to BitBucket is done!
[Pipeline] bat
[master] Running batch script

But the notifier icon is not visible or set in the bitbucket cloud.但是通知程序图标在 bitbucket 云中不可见或未设置。

在此处输入图片说明

Is there anything I missed to configure?有什么我错过的配置吗?

documentation/releasenotes at 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 上的文档/发布说明

says Using Jenkins 2 pipeline Add the following at the beginning of your Jenkinsfile:说使用 Jenkins 2 管道在 Jenkinsfile 的开头添加以下内容:

bitbucketStatusNotify ( buildState: 'INPROGRESS' )

And add the following at the ending of your Jenkinsfile:并在 Jenkinsfile 的末尾添加以下内容:

bitbucketStatusNotify ( buildState: 'SUCCESSFUL' )

the readme on github is more complete: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin github上的readme更完整: https : //github.com/jenkinsci/bitbucket-build-status-notifier-plugin

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

相关问题 Jenkins Bitbucket 构建状态通知程序插件未显示 - Jenkins Bitbucket Build Status Notifier Plugin not showing jenkins 的 bitbucket-build-status-notifier 插件报告错误状态 - bitbucket-build-status-notifier plugin for jenkins reports wrong status bitbucket-build-status-notifier-plugin 使用凭据和管道 - bitbucket-build-status-notifier-plugin using credentials with pipeline “java.lang.Exception: None or multiple repos”与 Jenkins 多分支管道中的 BitBucket Notifier - "java.lang.Exception: None or multiple repos" with BitBucket Notifier in Jenkins multi-branch pipeline Jenkins 2.3.5 构建通知(Emailext、bitbucket 构建状态通知程序)不工作 - Jenkins 2.3.5 Build Notification (Emailext, bitbucket build status notifier) Not Working 在 Jenkins 中使用多分支管道“定期构建” - "Build Periodically" with a Multi-branch Pipeline in Jenkins 詹金斯多分支管道 - Jenkins multi branch pipeline Jenkins使用Bitbucket Branch Source插件从标签构建 - Jenkins build from tag using Bitbucket Branch Source plugin 詹金斯错误与插件bitbucket分支源插件 - Jenkins error with plugin bitbucket branch source plugin Jenkins 管道确定分支是否用于 Bitbucket 拉取请求 - Jenkins pipeline determine if a branch is for Bitbucket pull request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM