capistrano3 - How to pass arguments to Capistrano 3 tasks in deploy.rb -
here tutorial how pass parameters capistrano 3 task.
namespace :task desc 'execute specific cmd task' task :invoke, :command |task, args| on roles(:app) execute :cmd, args[:command] end end end can executed with:
$ cap staging "task:invoke[arg]" how can use in deploy.rb? following not work.
before :started, "task:invoke[arg]"
not sure before/after, capistrano 3 can use rake syntax , call task within task:
rake::task["mynamespace:mytask"].invoke(arg)
Comments
Post a Comment