[英]How can I deploy with Capistrano from an SVN repo on the deployment target machine?
我已经使用Capistrano进行了一段时间的部署,但始终将SVN存储库与要部署的生产主机部署在不同的计算机上。
现在我遇到的情况是存储库和生产机器相同。 这是我的deploy.rb
文件...
set :application, 'my_app'
set :repository, "file:///home/ethan/svn/my_app/trunk"
set :deploy_to, "/var/www/#{application}"
set :use_sudo, false
role :app, 'ethan@my_production_host.com'
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
task :stop, :roles => :app do
# Do nothing.
end
desc "Restart Application"
task :restart, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
end
这是Capistrano尝试部署时返回的内容(我在开发计算机上运行此命令)...
$ cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "svn info file:///home/ethan/svn/my_app/trunk -rHEAD"
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///home/ethan/svn/my_app/trunk'
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/my_app/releases/20110919111200; true"
servers: ["my_production_host.com"]
[ethan@my_production_host.com] executing command
command finished
Command svn info file:///home/ethan/svn/my_app/trunk -rHEAD returned status code 256
有什么建议么?
您将必须使用在此处记录的local_repository
选项: https : //github.com/capistrano/capistrano/wiki/2.x-Significant-Configuration-Variables 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.