Hi,
I’ve configured branch restrictions so that:
main requires pull requests
The last commit must have at least 1 successful build
Merging with unresolved merge checks is not allowed
This works well — merges to main are blocked if the build fails.
Now I’m trying to implement an emergency hotfix path with the following behavior:
Normal flow:
PR → main
Merge blocked if build fails
Emergency flow:
Create hotfix/* branch
Allow controlled merge to main even if the build fails (only for a restricted group, e.g., release managers)
What is the recommended approach in Bitbucket Cloud to support this?
This workflow is currently not supported by branch restrictions out of the box.
We do provide a solution for this kind of workflow via our Bitbucket app Flowie.
You can use rules and conditions along with the merge plugin and the allow option. Your configuration would be something like this:
configure({
plugins: [
minimumBuilds([source(/hotfix.*/), 0], [otherwise, 1]),
merge(
[source(/hotfix.*/), {allow: ["RELEASE_MANAGERS_GROUP"]}],
[otherwise /* default options */]
),
],
})
Hope it helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.