|
Deploying multiple projects/applications: msg#00085lang.ruby.capistrano.general
I'm trying to use Cap2 to deploy non-Rails applications and am running into probably an impedance mismatch. Capistrano is build to checkout one project/application from SVN (or whichever SCM) and deploy it onto remote servers. It assumes that this single checkout/deploy step will cause the entire web application to be deployed. In my case, we have 6 difference web apps (each sitting in their own folders in SVN). For the entire website to be functioning, I need all 6 webapps to be deployed and running. Whenever a new build is rolled out, I need all 6 webapps to be updated. I've written a custom task to handle this -- task :checkout do get_defaults # initializes the $projects with the list of projects deploy.setup for project in $projects set :repository, "http://agni.cleartrip.com/svn/repos/ #{project[0]}" set :application, "#{project[1]}" puts "#{application} -- #{repository}" deploy.update_code end But with each iteration the same application is being checked out and deployed! Upon digging deeper into the Capistrano code I found the culprit: def command @command ||= case copy_strategy when :checkout source.checkout(revision, destination) when :export source.export(revision, destination) end end Almost all private helper functions in copy.rb (the strategy which I'm using) are written in this way. They don't compute commands/variable values more than once. Am I barking up the wrong tree? Is there a more elegant way of doing this in Capistrano? Saurabh. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Call for help: documentation: 00085, Jamis Buck |
|---|---|
| Next by Date: | Executing a task before each task is executed?: 00085, Saurabh Nanda |
| Previous by Thread: | Call for help: documentationi: 00085, Jamis Buck |
| Next by Thread: | Re: Deploying multiple projects/applications: 00085, Jamis Buck |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |