jenkinsci/bitbucket-branch-source-plugin

Provide option to retrigger a failed build.

mkjkec2005 opened this issue · 5 comments

What feature do you want to see added?

Currently the plugin does not provide an option to retrigger failed builds. Users need to go to Jenkins and run the failed PR build job. Is there a way to achieve this from Bitbucket?

Upstream changes

No response

Are you interested in contributing this feature?

No response

Gentle reminder. Could you please help? Or please suggest if there is an alternative.

Does Bitbucket support such a feature? It seems a rebuild button would need a plugin for Bitbucket too, not only for Jenkins.

On Bitbucket Data Center:

On Bitbucket Cloud:

Possibly though, you could make Jenkins add a comment to the pull request when the build fails. That comment could then include a rebuild link. There may be some Jenkins plugin for this already.

Thank you @KalleOlaviNiemitalo. The problem with comment is how do we ensure that we post using a rebuild link? Jenkins rebuild will needs a crumb for form submission or post request.

There is the Build Authorization Token Root plugin for triggering builds with an API token rather than an anti-CSRF crumb. I don't have experience with it. There are also other plugins in the Build Triggers category; some of them might be better for your scenario.