Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

I configured the settings provided in notifier plugin and added the notifier script function in the beginning and end of my 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.

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.

enter image description here

Is there anything I missed to configure?

like image 643
Yahwe Raj Avatar asked Aug 30 '16 11:08

Yahwe Raj


People also ask

Can Bitbucket integrate with Jenkins?

The Bitbucket Server integration plugin is the easiest way to connect Jenkins to Bitbucket Server. With a few simple steps you can configure it to: Automatically create webhooks in Bitbucket to trigger builds. Allow Jenkins to clone/fetch from Bitbucket to run the builds.


Video Answer


1 Answers

documentation/releasenotes at 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:

bitbucketStatusNotify ( buildState: 'INPROGRESS' )

And add the following at the ending of your Jenkinsfile:

bitbucketStatusNotify ( buildState: 'SUCCESSFUL' )

the readme on github is more complete: https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin

like image 92
Tubby Avatar answered Nov 15 '22 07:11

Tubby