How to Manage Pull Requests (PR) and Branch Strategy with Mendix and CI/CD?

0
Hi Mendix Community, We are running a CI/CD pipeline with three main branches: Main, Test, and Dev. We are currently facing some challenges and would appreciate advice on the best approach. Our current setup and constraints: Direct pushes to Main and Test branches are not allowed. Since Mendix Studio Pro does not natively support Pull Request (PR) workflows, we are stuck trying to find the right branching strategy. Our previous workflow was as follows: Create a feature branch from the Test branch. Develop on the feature branch. Merge into the Dev branch, resolve conflicts, and push if all checks pass. Run dev-tests. Merge into the Test branch, resolve conflicts, and push if all checks pass. Run tests. If tests succeed, merge into Main and delete the feature branch. The challenge:Because we cannot directly push or create PRs into the Test and Main branches, we currently have to chain merges like Dev → Test → Main.This causes major difficulties in conflict resolution and keeping branches synchronized. Our questions: What is the best practice branching and merge strategy for Mendix projects in this scenario? If PRs cannot be made directly into Test and Main, what is the recommended way to handle this? How have others successfully applied Git-based PR and pipeline workflows with Mendix projects? Any examples or lessons learned? We would really appreciate any advice or experience you can share. Thanks in advance!
asked
2 answers
0

Hi Alp,

 

It's a big issue I have with the platform as well. I hope Mendix are paying attention that for any proper quality control this feature is a must.

 

Our standard workflow is dev -> stg -> main. We just assume the senior devs are allowed to do the branch merges and deployments and can always check via git history.

 

Features are then built of a feature line from dev.

When a feature is ready to go we do a final pull from dev -> feature -> dev so the conflicts are resolved off the dev line.

 

Sometimes, we need a hotfix into production. To do this, we create a new hotfix line from main. Do the fix there and merge main -> hotfix (similar as above to make sure all is good) -> main. We can then also cherry pick the commit back into dev and resolve conflicts there to make sure when it all gets propagated back up to main it works.

answered
0

I've read two cool references that may be some help for you 

 

https://www.mendix.com/blog/advanced-branching-merging-strategies-part-1-2/

 

and 

 

https://www.linkedin.com/pulse/mendix-branching-strategies-mitchel-mol--wx8ke/

answered