We have many people working and creating PR against develop branch.
Sometimes happen the following:
PR A is open, it add some code that call f(), pipeline build is OK
PR B is open, it add a parameter to function f(), pipeline build OK
PR B is merged in develop, develop is OK
PR A is merged in develop, develop FAIL
This could be prevented if after merging PR B, all open PR against Develop would be rebuild.
I know this is going to increment a lot the "cost" in pipeline for each merge, BUT is a little price I'm willing to pay to avoid Develop break.
Pretty sure bitbucket does not have a nice way to do it, but im open to script/api trickery
Pipelines run on push or when manually triggered, to achieve what you're trying to do I would suggest changing the workflow of your team and make sure that before merging branch is up to date with develop.
This could be achieved after merging PR A either by rebasing PR B on top of develop or merging develop to PR B. This could be done through UI by clicking on the Sync button for the branch PR B as in the screenshot below.
Any of those actions would trigger new pipeline.
Thanks,
Peter
Thank you,
This is pretty much what i was looking for,
is there a way to disable merge (or display a warning) if not in sync with the target branch?
I want to make the process as foolproof as possible
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.