We are adopting Git on the company after some years of SVN usage. The git flow suits our needs very well with the master/hotfix/develop/release branches. So far everything is going well, apart from a conundrum. Our project is a Java app for weblogic, we produce a WAR file on the project build.
The context is:
- We have master as the trunk that holds code that goes to production
- A new hotfix is branched out of master
- Developers commit on hotfix
- QA tests hotfix
- A binary is approved QA-wise
The big question is:
- Should we deploy the binary from hotfix to production?
- Or should we merge to master, build from there, test and then deploy to production?
I understood that master would be the branch that would hold the code that goes to production. So I have an issue with deploying from hotfix. However deploying from master would mean 2 QA cycles on the same codebase as the 2 builds (on hotfix and master) might produce different binaries depending on maven dependencies/build environment/... And 2 QA cycles on the same codebase is a waste of resources.
I searched the web and found little reference about this. Here and there I see people saying they deploy from master, while others deploy from hotfix. The thing is that people who deploy from master usually are on a parsed language project (PHP, Perl, ...) so they don't have the binary to consider.
Does any of you faced this issue already? What approach did you take?
Thanks in advance!