Bitbucket Build Status of Pull Request showing failed builds, instead of latest build status
Asked Answered
B

0

12

I integrated Bitbucket with Cloudbees, having the following workflow: everytime an user creates a Pull Request, having as target develop branch, a multi-branch pipeline in cloudbees will cluster the pull request (e.g. PR-34) and it will trigger the first build (#1). If it passes, then everything is ok and bitbucket will show the build status as "passed".
However, if the build fails, it means that the user should trigger another one on the same pull request (PR-34 #2). If the second build passes, I expect to have the build status as "passed" but I get "1 build failed", due to the first build and no matter how many passed builds I will have in the future, the status will always remain as failed if at least one of the builds failed.
So, in order to resume the problem I need help on those following topics:

  1. How should I configure bitbucket pull request status to show me the result of the latest build?
  2. How should I constrain the merge checks so that users will be able to merge a pull request only if the latest build passed? Note: the check "Minimum successful builds" will not work since the behavior is the following: "If there are more builds than specified, they are all required to be successful in order to merge the pull request."
Bitternut answered 6/1, 2022 at 9:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.