bitbucket-build-status-notifier-plugin icon indicating copy to clipboard operation
bitbucket-build-status-notifier-plugin copied to clipboard

Only override buildKey when overrideLatestBuild.

Open marklagendijk opened this issue 7 years ago • 6 comments

This pull request makes sure that the buildKey of BitbucketBuildStatusNotifierStep calls, are not incorrectly overriden.

Current behaviour

  1. Create a pipeline which calls bitbucketStatusNotify with a static buildKey, e.g. build.
  2. Fail the pipeline, so Bitbucket gets a failed build.
  3. Rerun the pipeline. Bitbucket will show it as a new build, instead of overriding the previous build result.

Fixed behaviour

  1. Create a pipeline which calls bitbucketStatusNotify with a static buildKey, e.g. build.
  2. Fail the pipeline, so Bitbucket gets a failed build.
  3. Rerun the pipeline. Bitbucket will correctly replace the previous result, with the latest one.

marklagendijk avatar Dec 06 '18 10:12 marklagendijk

This fixes jenkins-40998 in an alternative way to #35. I think this fix is better because it stays closer to the actual Bitbucket API.

marklagendijk avatar Dec 06 '18 10:12 marklagendijk

hi, will this be merged anytime soon? :)

monkeybeans avatar Feb 06 '19 13:02 monkeybeans

This fixes an issue I'm currently having, any chance of a review/merge soon?

biodrone avatar Sep 30 '19 10:09 biodrone

I've also bumped into this issue when using a static buildKey with BitbucketBuildStatusNotifierStep.

Whenever a build is aborted and we attempt to run it again we have duplicate build status being created in Bitbucket (instead of being overridden). Which is a bit annoying when merge checks are in place...

@amansilla any chance this PR could be approved? Thanks!

joaori avatar May 17 '20 19:05 joaori

Hello. Any plans for this PR be approved and merged soon? :D

Noraldeno avatar Feb 06 '21 00:02 Noraldeno

As a workaround until this PR is merged in, I instead just use curl to send build statuses to Bitbucket.

https://gist.github.com/Noraldeno/af0e339a48425db72dda118b0481e688

Noraldeno avatar Feb 13 '21 00:02 Noraldeno