Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only override buildKey when overrideLatestBuild. #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Only override buildKey when overrideLatestBuild. #42

wants to merge 1 commit into from

Conversation

marklagendijk
Copy link

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.

This makes sure that the buildKey of BitbucketBuildStatusNotifierStep calls, are not incorrectly overriden.
@marklagendijk
Copy link
Author

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.

@monkeybeans
Copy link

hi, will this be merged anytime soon? :)

@biodrone
Copy link

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

@joaori
Copy link

joaori commented May 17, 2020

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!

@Noraldeno
Copy link

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

@Noraldeno
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants