开发者

robust deploy strategy with capistrano and git

开发者 https://www.devze.com 2023-02-15 21:26 出处:网络
What is the best way to set up a robust deploy strategy for a RoR app that allows for the following scenario?

What is the best way to set up a robust deploy strategy for a RoR app that allows for the following scenario?

  1. new feature committed
  2. new feature deployed to staging environment
  3. emergency feature/fix committed
  4. emergency fix deployed to staging (and previous feature excluded)
  5. emergency fix tested on staging
  6. emergency fix deployed to production
  7. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号