calling a task after deploy:symlink:release

88 views
Skip to first unread message

deadb...@gmail.com

unread,
Feb 24, 2015, 3:55:34 PM2/24/15
to capis...@googlegroups.com
I'm have a task that I've written that I want executed after deploy:symlink:release is executed.  From looking at http://capistranorb.com/documentation/getting-started/flow/ 

I'm missing something because when I uncomment the "after :deploy..." line then things break and nothing works, saying 


$ cap production deploy

(Backtrace restricted to imported tasks)

cap aborted!

Don't know how to build task 'uname'


Tasks: TOP => production

(See full trace by running task with --trace)





after :deploy, :uname
 
desc "Go get our code"
task :pull do
  run_locally do
    execute "rsync -avHI --log-file=rsync.log '#{repo_url}' '#{fetch(:deploy_from)}'"
  end
end

task :debug_tar_roles do
  on roles(fetch(:tar_roles, :all)) do |h|
    puts "Host Obj: #{h}"
    info "#{capture(:hostname)}: #{capture(:uname)}"
  end
end

desc "Show us the uname"
task :uname do
    on roles(:OurServers) do |host|
      puts capture(:'uname -a')
    end
end

Lee Hambley

unread,
Feb 24, 2015, 4:16:42 PM2/24/15
to Capistrano

In which file is :uname defined?

Sent from my Nexus 5.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/bf30f612-a0e5-4725-afed-ae9ef0519671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

deadb...@gmail.com

unread,
Feb 24, 2015, 4:23:01 PM2/24/15
to capis...@googlegroups.com
my config/deploy.rb

Lee Hambley

unread,
Feb 25, 2015, 5:15:53 AM2/25/15
to Capistrano
I think you have to move the `after :deploy, :uname` until after you actually define the task.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.

deadb...@gmail.com

unread,
Feb 25, 2015, 9:09:53 AM2/25/15
to capis...@googlegroups.com
That worked, thank you!
Reply all
Reply to author
Forward
0 new messages