lib/capistrano/tasks/stretcher.rake in capistrano-stretcher-0.1.0 vs lib/capistrano/tasks/stretcher.rake in capistrano-stretcher-0.2.0
- old
+ new
@@ -27,10 +27,14 @@
def application_builder_roles
roles(fetch(:application_builder_roles, [:build]))
end
+ def consul_roles
+ roles(fetch(:consul_roles, [:consul]))
+ end
+
task :mark_deploying do
set :deploying, true
end
desc "Create a tarball that is set up for deploy"
@@ -137,10 +141,10 @@
end
desc "Kick the stretcher's deploy event via Consul"
task :kick_stretcher do
fetch(:deploy_roles).split(',').each do |target_role|
- on application_builder_roles do
+ on consul_roles do
opts = ["-name deploy_#{target_role}_#{fetch(:stage)}"]
opts << "-node #{ENV['TARGET_HOSTS']}" if ENV['TARGET_HOSTS']
opts << "#{fetch(:manifest_path)}/manifest_#{target_role}_#{fetch(:stage)}.yml"
execute :consul, :event, *opts
end