Well you could have stages version1.1, version1.2, version1.3 and so on and
then set :branch, "version 1.x" as appropriate in each version1.x.rb file
(assuming each different version corresponds to a tag or branch in git) and set
:deploy_dir to be different for each but otherwise share the same settings for
the different stages so you'd end up with a directory structure on your server
something like:
version1.1/
- current symlink
- releases/
- TIMESTAMP1/
- TIMESTAMP2/
- TIMESTAMP3/
version1.2/
- current symlink
- releases/
- TIMESTAMP1/
- TIMESTAMP2/
- TIMESTAMP3/
version1.3/
- current symlink
- releases/
- TIMESTAMP1/
- TIMESTAMP2/
- TIMESTAMP3/
and so on.
Henry
On 7 Mar 2011, at 21:02, Chris Patti wrote:
>
>
> On Mon, Mar 7, 2011 at 3:56 PM, Greg Pederson <[email protected]> wrote:
> Hey Chris,
> I use capistrano for staging and production and point the appropriate git
> branch for each (ie master for production and staging for staging)
>
> You'll need this gem https://github.com/jamis/capistrano-ext
>
> Then you can put something like:
>
> require 'capistrano/ext/multistage'
>
> set :stages, %w(staging production)
> set :default_stage, 'staging'
>
> in your main deploy script and then create files under deploy/ for each
> stage, ie deploy/production.rb and deploy/staging.rb and in each you can
> instruct capistrano on which repository to use:
>
> set :branch, "staging"
>
> or
>
> set :branch, "production"
>
> Hope this helps,
> Greg
>
> Greg Pederson
> Founder and Technical Director
> 407.385.0098 office
> 888.308.9695 toll free
> www.NsightDevelopment.com
> Contact Me LinkedIn Facebook Twitter
> Signature powered by WiseStamp
>
>
>
> On Mon, Mar 7, 2011 at 3:43 PM, Chris Patti <[email protected]> wrote:
> Folks;
>
> We're trying to use Capistrano to deploy services, so we need to
> deploy versioned directories rather than just "current".
>
> What's the best way for me to handle this? I'm thinking maybe
> overriding deploy:symlink, but I realize that wouldn't handle the
> releases/datestamp issue for when the next release happens.
>
> So, we'd want: docroot/version-1.1
> version-1.2
> version-1.3
>
> etc.
>
> Has anyone done this? is it achievable just by setting variables like
> current_release, etc? Or do I need to override deploy tasks?
>
> Thanks,
> -Chris
>
>
> Hi Greg, thanks for the response.
>
> I guess I don't understand how the Multistage plugin will help me achieve
> what I'm looking for here. The goal isn't separate staging/test/development
> environments, but to have the filesystem on the server actually contain
> versioned directories for each version we're deploying.
>
> Sorry if I'm missing something (quite possible)
>
> Thanks,
> -Chris
>
> --
> Christopher Patti - Geek At Large | GTalk: [email protected] | AIM:
> chrisfeohpatti | P: (260) 54PATTI
> "Technology challenges art, art inspires technology." - John Lasseter, Pixar
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en