TStackhouse wrote:
Hi all,
I was discussing this in the chat room and lhambley/tsal recommended I
bring it up to the list.
Basically I'm working on streamlining a multistage deploy script that
I wrote for a project to be more general and have less redundant
code. To that end, I'm trying to consolidate as many tasks as
possible out of my staging.rb and production.rb recipes.
I tried using a common file and `load`ing them into each of the
stages, but it didn't even see my tasks there. I also tried putting
that load into my capfile instead, but I only get greeted with a "no
servers found to match {:once=>true, :pty=>true}" message.
Here's the details:
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
Capistrano v2.5.14
File structure:
* Capfile
* config/
** common.rb
** deploy.rb
** deploy/
*** production.rb
*** staging.rb
Capfile, deploy.rb, production.staging.rb: http://pastie.org/872741
common.rb: http://pastie.org/872748
This is still very much a work in progress, so there's a little cruft
in there, but any help would be greatly appreciated.
-Tim
Hi Tim,
I don't know If I understood you correctly, I think you want to share
task between stages.
Personally I prefer to load common tasks file from deploy.rb. (you're
doing it in Capfile before config/deploy). I guess there is not problem
with it.
Your problem about see the tasks is produced because none of the
tasks has description. If no description tasks are not shown in the list.
I have a generic template[1] that share tasks between stages.
Regards
[1]http://github.com/rgo/capistrano-generic-template
--
Rafa
--
* 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