capistrano doesn't call deploy:start when executing deploy:cold -
i'm using capistrano 2 deploy application. according documentation, deploy:cold
task call deploy:update
followed deploy:migrate
, call deploy:start
.
in application don't have migration step, , when run cap deploy:cold
, update shows this:
* 2014-04-09 14:57:45 executing `deploy:migrate' `deploy:migrate' run servers matching {:roles=>:db, :only=>{:primary=>true}}, no servers matched
and deploy:start
not being called. if call manually, works fine - never through deploy:cold
. missing?
the problem capistrano 2 defines default task called deploy:migrate
specified run role :db
. if don't have role in application (which not), when deploy:migrate
runs error out on missing role, , kind of error terminates deployment scenario.
this can happen other tasks, if have complex setup tasks run specific servers. behavior not documented @ @ capistrano's site, shame.
starting capistrano 2.7 there way circumvent "is run servers matching role" error, specifying task property tells capistrano skip tasks if no servers matches of specified roles:
for example:
namespace :deploy task :stuff, :roles => :somerole, :on_no_matching_servers => :continue # stuff end end
now works custom tasks, how set default task migrate
? have override task own setting , add :on_no_matching_servers
option. i've added global.rb
file:
namespace :deploy task :migrate, :on_no_matching_servers => :continue end end
Comments
Post a Comment