We run 2 different environments on our server - say, production.mydomain.com and staging.mydomain.com
The staging environment is nearly identical to the production environment, except that it often has several new features which are being reviewed (eg new_user_profile, image_tagging, etc). These features are individually accepted by the client at different times.
What is the best way to push any individual feature (eg new_user_profile) from staging to production?
Our setup is listed below, but would like to hear alternatives you use also:
- Ruby on Rails
- Git (we have several feature branches, which get merged into a "staging" branch when nearing completion)
- Capistrano, with multi-staging ext.
We have tried the following two approaches, neither of which works terribly well:
- Having lots of if/else statements throughout our code, eg if new_user_profile ....
- Deploying individual git branches (eg branch new_user_profile) to staging, getting this reviewed, and then merging to production