Merge was being prevented, and I thought that this may be due to the issue in Jenkins itself. After it's been resolved, forced builds succeeded, yet merge was still not enabled.
From this thread I gathered that the build count is attached to commits, not to the PR itself. So I have made a trivial change and committed it forcing a new build which was successful. The bitbucket PR page shows it as such, but yet the merge button still says "There is 1 issue preventing you from merging this pull request. You need a minimum of one successful build before this pull request can be merged."
I am puzzled. Any clues?
Not sure if you're still experiencing the issue, but one option for troubleshooting is that you can update the status of the failed build over in the REST API.
If the latest commit in your PR is still this commit with a failed build, though, (even if another build was made against that commit that succeeded after the fact) we would expect that it couldn't be merged - as any failed build that hasn't been corrected by the integrated CI tool is assumed to be a result of an issue in the code, meaning that a new commit needs to pushed to the source branch of the PR to fix the code problem.
If this issue is still happening, feel free to post back the results from some of those REST API endpoints if you want help analyzing what you're getting back.
If the build failed because of a missing dependency (e.g. because it wasn’t published yet, or some other issue with the repository) or some other issue with the pipeline itself (if managed outside the repository), then you can fix it without commit, and manually re-trigger a build.
Bitbucket will see the successful new build, but since the old, failed build is still there, it will prevent you from merging.
From this comment I understand that you have to either hack through the API or push a fake commit in order to remove the old build, right? Not very nice…
(this is with Jenkins btw)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Late to respond to this, sorry!
So this is what I am referring to when I stated "that hasn't been corrected by the integrated CI tool". If the CI tooling re-runs the build and posts/corrects the build status for that same build key, it will overwrite the previous status turning the failure into a success. With that, the merge check should pass, as all builds would be passing for the head commit, which would remain the same.
Sorry for any lack of clarity!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.