Я пытаюсь получить многоступенчатое развертывание capistrano для моего производства и постановки серверы. Вот мой файл deploy.rb
(детали scm опущены):
require 'bundler/capistrano'
require 'whenever/capistrano'
set :application, "myapp"
set :stages, %w{staging, production}
set :default_stage, "staging"
require 'capistrano/ext/multistage'
set :deploy_to, "/webapps/myapp"
set(:domain) { "#{domain}" }
role(:web) { domain }
role(:app) { domain }
role(:db, :primary => true) { domain }
default_run_options[:pty] = true
namespace :one do
task :foo do
puts "foo"
end
end
И в config / deploy / production.rb
:
set :domain, "production.com"
set :user, "prod"
config / deploy / staging.rb
:
set :domain, "shootsystage.com"
set :user, "stage"
Ничего особенного не происходит (я думаю). Запуск cap production one: foo
работает нормально. Но запуск cap с постановкой одного: foo
приводит к:
the task `staging' does not exist
Что происходит?