robust deploy strategy with capistrano and git
What is the best way to set up a robust deploy strategy for a RoR app that allows for the following scenario?
- new feature committed
- new feature deployed to staging environment
- emergency feature/fix committed
- emergency fix deployed to staging (and previous feature excluded)
- emergency fix tested on staging
- emergency fix deployed to production
- original new feature deployed back to staging
As far as I can tell, I 开发者_如何学Gowill need to use either git branches or tagging or both. Are there any tools that can reduce or automate the overhead of maintaining these branches or tags?
I'm not sure there is. This is more of a process question to me than a technical, how-to question.
Tagging and branching, with the usage of topic (or feature) branches is usually the way to go. I tend to keep two long-lived branches, master and staging, and I use topic branches for all of the development. The long-lived branches are the only ones used for deploying to their respective environments and emergency fixes are handled by git revert followed by cap deploy followed by the fix in a topic branch which is then merged into whatever long-lived branch the emergency happened on.
Hope this helps.
精彩评论