Capistrano部署卡住了

时间:2018-08-16 12:34:25

标签: deployment capistrano

我正在尝试使用capistrano部署Java服务器

cap临时部署--trace

运行此命令将显示以下输出。它只是停留在最后一行。

** Invoke staging (first_time) ** Execute staging ** Invoke load:defaults (first_time) ** Execute load:defaults [Deprecation Notice] set :scm, :git is deprecated. To ensure your project is compatible with future versions of Capistrano, remove the :scm setting and instead add these lines to your Capfile after require "capistrano/deploy": require "capistrano/scm/git" install_plugin Capistrano::SCM::Git ** Invoke deploy (first_time) ** Execute deploy ** Invoke deploy:starting (first_time) ** Execute deploy:starting ** Invoke deploy:check (first_time) ** Invoke git:check (first_time) ** Invoke git:wrapper (first_time) ** Execute git:wrapper 00:00 git:wrapper 01 mkdir -p /tmp deployuser@10.1.2.248's password:deployuser@MACHINE's password: ✔ 01 deployuser@MACHINE 11.682s Uploading /tmp/git-ssh-music_backend-staging-b0206726.sh 100.0% 02 chmod 700 /tmp/git-ssh-music_backend-staging-b0206726.sh ✔ 02 deployuser@MACHINE 1.873s

它继续运行。永不停止。下面是我的deploy.rb文件

require 'capistrano/setup' lock '3.11.0' load File.expand_path('../../lib/capistrano/tasks/music_backend.rb', __FILE__) set :scm, :git set :branch, ENV['branch'] || "master" set :keep_releases, 3 set :stages, ["staging", "production"] set :default_stage, "staging" set :log_level, :debug set :default_shell, '/bin/bash -l' namespace :build do task :setEnvFiles do on roles (:app) do # environment = fetch(:environment) # env_dest = "#{deploy_to}/current/config/#{environment}/" # lib_dest = "#{deploy_to}/current/lib/DiwaliPfAccessMsn-0.2.4.jar" # if environment == 'qa' # puts "====================Copying environment file ======================" #Line 22 # execute :cp, "#{deploy_to}/server.properties", env_dest, "|| exit 0" # #capture("cp #{env_file_location} #{env_dest}") # puts "====================Copying diwali file ======================" #Line 22 # execute :cp, "#{deploy_to}/DiwaliPfAccessMsn-qa-0.2.4.jar", lib_dest, "|| exit 0" # #capture("cp #{diwali_file_location} #{lib_dest}") # puts "====================Copying beans file ======================" # execute :cp, "#{deploy_to}/beans.xml", env_dest, "|| exit 0" # puts "====================Copying feedDetails file ======================" # execute :cp, "#{deploy_to}/FeedDetails.xml", env_dest, "|| exit 0" end end end after "deploy", "build:setEnvFiles" after "build:setEnvFiles", "musicbackendapi:deploy" after "deploy:rollback", "musicbackendapi:deploy" # keep only the last 5 releases

我觉得远程服务器无法通过ssh连接到github。 虽然我尝试调试它。一世 我在capistrano和ssh日志中找不到任何东西

0 个答案:

没有答案