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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -