In our organization, we operate with three main branches:
- production
- staging: the end client can test out the feature
- development: developers and QA can test out the feature
Here's how it works currently. A client will request a certain functionality. They have a vague idea of what they think they want. They will discuss with the project lead and he will discuss with the developers. If the client is okay with the presented idea for the implementation, the developers will go ahead and implement the feature.
- production --> feature branch
- feature branch --merge--> development, when done. Now the QA and lead can test out the feature. If they are satisfied and want the client to test it out:
- feature branch --merge--> staging. Now the client can test it out. If they are satisfied then:
- feature branch --merge--> production.
The reason it's done this way is that some features will be stuck in development or staging branches for weeks, months, even years, due to indecision or changing requirements from the client or project lead. Therefore we are unable to merge dev into staging into prod.
The branch environments are different. This causes a ton of issues as well. When merging a feature into each branch, there's going to be merging issues almost always. If staging doesn't show a bug, the bug might still pop up in prod, because the environment is different.
How could we streamline our processes to work better for us?
I've been considering GitLab's Review Apps so that environments would get spun up when creating pull requests. Would that work for us?