0

I am facing problem with jenkins bitbucket notify build status plugin.

Problem statement: I am triggering a jenkins job from Developers Application development branch through bitbucket pipeline. I am using bitbucket notify build status plugin, after the execution is completed. But the notifier is updating the last commit id of automation branch where we have all the automation scripts. Instead of updating it to the development branch commit id from where the job was triggered.

Can anyone help me with updating the status for right commit id on development branch?

030
  • 10,842
  • 12
  • 78
  • 123
user2405952
  • 41
  • 2
  • 7

1 Answers1

0

Looks like you are encountering an issue similar to what has been reported here - Jenkins sending notifications to the wrong commit id

To resolve the issue, specify the commitId and repoSlug as below:

bitbucketStatusNotify(
    buildState: '<INPROGRESS> OR <SUCCESSFUL> OR <FAILED>',
    repoSlug: '<your_repo_slug>',
    commitId: '<commit_id>'      
)

Note that the repoSlug and commitId parameters work only when they are both specified

ben5556
  • 2,915
  • 2
  • 11
  • 16
  • Can you help me with the steps , Where i need to add this script. As i am triggering the jenkins job from bitbucket.yml file – user2405952 Oct 29 '18 at 06:44
  • You need to add it in your jenkins job – ben5556 Oct 29 '18 at 07:10
  • Do you have any example links for the same ? SO that i can follow the required step. Thanks for all the help you have provided. I am stuck in this task since a week, will really appreciate your quick response. – user2405952 Oct 29 '18 at 08:38
  • Hi, examples can be found on https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin – ben5556 Oct 29 '18 at 21:44