capistrano:通知用户有关部署的信息

时间:2015-01-06 10:21:23

标签: ruby-on-rails linux shell deployment capistrano

我使用capistrano v3部署到RoR生产服务器。该应用程序部署到/[...]/apps/myapp/current,每个都发布“当前”目录更改。我想通知所有用户有关更改的信息。我想使用wall,但收到错误wall: cannot get tty name: Inappropriate ioctl for device。但是,wall命令在ssh会话中有效,所以我想这是因为capistrano不是交互式shell。我目前在deploy.rb中的代码:

task :notify_deployed do
  on roles(:app) do
    run_locally do
      execute 'wall /[...]/apps/myapp/shared/cap_msg.txt'
    end
  end
end

after "deploy:finished", :notify_deployed

0 个答案:

没有答案