You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #424, the code I provided there doesn't do what I'd like. Given these two tasks
namespace :notification do
notifier = Slack::Notifier.new('https://hook.bearychat.com/=bw6KQ/incoming/2d9481657d9013eb61cb41d3708f39a8')
task :start_deploy do
notifier.ping %(mina 1.x test - start deploy task ran)
command %(echo 'started')
end
task :finish_deploy do
notifier.ping %(mina 1.x test - finish deploy task ran)
command %(echo 'finished')
end
end
I get this output:
started
Elapsed time: 0.00 seconds
finished
Elapsed time: 0.00 seconds
-----> Creating a temporary build path
-----> Deploy finished
-----> Building
-----> Moving build to /home/deploy/mina-deploys/minatest/cure/releases/20160815063411
-----> Build finished
-----> Launching
-----> Updating the /home/deploy/mina-deploys/minatest/cure/current symlink
-----> Done. Deployed version 20160815063411
Elapsed time: 1.47 seconds
What I would like is for the finish_deploy output (and slack notification) to run after passenger is restarted, like so:
started
Elapsed time: 0.00 seconds
-----> Creating a temporary build path
-----> Deploy finished
-----> Building
-----> Moving build to /home/deploy/mina-deploys/minatest/cure/releases/20160815063411
-----> Build finished
-----> Launching
-----> Updating the /home/deploy/mina-deploys/minatest/cure/current symlink
-----> Done. Deployed version 20160815063411
Elapsed time: 1.47 seconds
finished
Elapsed time: 0.00 seconds
Is there a way to make mina do what I want?
The text was updated successfully, but these errors were encountered:
devvmh
changed the title
How to do a finish hook?
How to do a proper finish hook?
Aug 29, 2016
task deploy: :environment do
deploy do
run(:local) { invoke :'notification:start_deploy' }
invoke :'git:clone'
# ...other commands...
invoke :'deploy:cleanup'
on :launch do
invoke :'passenger:restart'
run(:local) { invoke :'notification:finish_deploy' }
end
end
end
to this
task deploy: :environment do
run(:local) { invoke :'notification:start_deploy' }
deploy do
invoke :'git:clone'
# ...other commands...
invoke :'deploy:cleanup'
on :launch do
invoke :'passenger:restart'
end
end
run(:local) { invoke :'notification:finish_deploy' }
end
Related to #424, the code I provided there doesn't do what I'd like. Given these two tasks
I get this output:
What I would like is for the finish_deploy output (and slack notification) to run after passenger is restarted, like so:
Is there a way to make mina do what I want?
The text was updated successfully, but these errors were encountered: