Only override buildKey when overrideLatestBuild.
This pull request makes sure that the buildKey of BitbucketBuildStatusNotifierStep calls, are not incorrectly overriden.
Current behaviour
- Create a pipeline which calls
bitbucketStatusNotifywith a staticbuildKey, e.g.build. - Fail the pipeline, so Bitbucket gets a failed build.
- Rerun the pipeline. Bitbucket will show it as a new build, instead of overriding the previous build result.
Fixed behaviour
- Create a pipeline which calls
bitbucketStatusNotifywith a staticbuildKey, e.g.build. - Fail the pipeline, so Bitbucket gets a failed build.
- Rerun the pipeline. Bitbucket will correctly replace the previous result, with the latest one.
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.
hi, will this be merged anytime soon? :)
This fixes an issue I'm currently having, any chance of a review/merge soon?
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!
Hello. Any plans for this PR be approved and merged soon? :D
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