I currently work with a young team of developers using ASP.NET, TeamCity and Octopus Deploy. One of our developers thinks that our system is flawed and introduces the inability to test production hotfixes. What is the best solution to this problem?
We have three environments: development, staging and production. Basically, our workflow only goes forward.
Git push to master -> TeamCity Build -> Octopus Deploy (Dev) -> Promote to Staging -> Promote to Prod
His solution is to have three branches: master (development), staging (staging) and prod (production). We do all active development in our master branch, do any QA in staging and merge from staging to prod when we need to perform a release. When a bug occurs in production, we make the change in staging, and then remerge into production, leaving our development branch alone. We eventually merge all development changes into the production branch once we are ready to release new features.
I don't think this is necessarily right however. My solution is to have the latest production version in the master branch. All development occurs in feature branches. When we've tested a feature branch, we merge back to production. Simple.
So what is the best solution to this problem? Also, some follow-up questions:
- Should we improve our QA process? Should we be doing QA on feature branches or on full releases?
- How should we set up our continuous integration? Should we have servers deployed for every version?
I'd love to hear some examples or suggestions you guys may have regarding this scenario. Thanks!