Search code examples
ruby-on-railscapistranocapistrano3

capistrano seems to skip all its tasks


When I run cap env deploy none of the steps run. What would I do to even begin debugging what the issue is. I'm not sure if its related but time bin/cap -T takes real 1m24.202s to run.

ruby -v: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
gem -v: 2.5.1

Even checking capistranos version number takes 45 seconds

# time bin/cap --version
Capistrano Version: 3.5.0 (Rake Version: 12.0.0)

real    0m42.940s

This is the output of cap deploy:

root@f9befa5efa56:~/lrnz# bin/cap --trace=stdout autoqa deploy
** Invoke autoqa (first_time)
** Execute autoqa
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke deploy:set_rails_env (first_time)
** Execute deploy:set_rails_env
** Invoke deploy:set_linked_dirs (first_time)
** Execute deploy:set_linked_dirs
** Invoke rbenv:map_bins (first_time)
** Execute rbenv:map_bins
** Invoke deploy (first_time)
** Execute deploy
** Invoke deploy:starting (first_time)
** Execute deploy:starting
** Invoke deploy:check (first_time)
** Invoke deploy:check_lock (first_time)
** Invoke deploy:check_git (first_time)
** Execute deploy:check_git
** Execute deploy:check_lock
** Execute deploy:check
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
** Execute git:check
** Invoke deploy:check:directories (first_time)
** Execute deploy:check:directories
** Invoke deploy:secrets (first_time)
** Execute deploy:secrets
** Invoke deploy:check:linked_dirs (first_time)
** Execute deploy:check:linked_dirs
** Invoke deploy:check:make_linked_dirs (first_time)
** Execute deploy:check:make_linked_dirs
** Invoke deploy:check:linked_files (first_time)
** Execute deploy:check:linked_files
** Invoke deploy:set_previous_revision (first_time)
** Execute deploy:set_previous_revision
** Invoke deploy:started (first_time)
** Execute deploy:started
** Invoke deploy:updating (first_time)
** Invoke deploy:new_release_path (first_time)
** Execute deploy:new_release_path
** Invoke slack:deploy:updating (first_time)
** Execute slack:deploy:updating
** Invoke deploy:deploy_info (first_time)
** Execute deploy:deploy_info
00:00 deploy:deploy_info
      >> Deploying master to autoqa
** Execute deploy:updating
** Invoke git:create_release (first_time)
** Invoke git:update (first_time)
** Invoke git:clone (first_time)
** Invoke git:wrapper
** Execute git:clone
** Execute git:update
** Execute git:create_release
** Invoke deploy:set_current_revision (first_time)
** Execute deploy:set_current_revision
** Invoke git:set_current_revision (first_time)
** Execute git:set_current_revision
** Invoke deploy:symlink:shared (first_time)
** Execute deploy:symlink:shared
** Invoke deploy:symlink:linked_files (first_time)
** Execute deploy:symlink:linked_files
** Invoke deploy:symlink:linked_dirs (first_time)
** Execute deploy:symlink:linked_dirs
** Invoke deploy:set_current_branch (first_time)
** Execute deploy:set_current_branch
** Invoke deploy:updated (first_time)
** Invoke bundler:install (first_time)
** Execute bundler:install
** Execute deploy:updated
** Invoke deploy:compile_assets (first_time)
** Invoke deploy:set_rails_env
** Execute deploy:compile_assets
** Invoke deploy:assets:precompile (first_time)
** Execute deploy:assets:precompile
** Invoke deploy:assets:s3upload (first_time)
** Execute deploy:assets:s3upload
** Invoke deploy:assets:backup_manifest (first_time)
** Execute deploy:assets:backup_manifest
** Invoke deploy:cleanup_assets (first_time)
** Invoke deploy:set_rails_env
** Execute deploy:cleanup_assets
** Invoke deploy:normalize_assets (first_time)
** Invoke deploy:set_rails_env
** Execute deploy:normalize_assets
** Invoke deploy:migrate (first_time)
** Invoke deploy:set_rails_env
** Execute deploy:migrate
** Invoke es:check (first_time)
** Execute es:check
** Invoke deploy:publishing (first_time)
** Execute deploy:publishing
** Invoke deploy:symlink:release (first_time)
** Execute deploy:symlink:release
** Invoke deploy:published (first_time)
** Execute deploy:published
** Invoke deploy:finishing (first_time)
** Execute deploy:finishing
** Invoke deploy:cleanup (first_time)
** Execute deploy:cleanup
** Invoke slack:deploy:updated (first_time)
** Execute slack:deploy:updated
** Invoke deploy:finished (first_time)
** Invoke deploy:permissions (first_time)
** Execute deploy:permissions
** Invoke deploy:restart (first_time)
** Invoke deploy:secrets
** Execute deploy:restart
** Execute deploy:finished
** Invoke deploy:log_revision (first_time)
** Execute deploy:log_revision
** Invoke notify:logentries (first_time)
** Execute notify:logentries
** Invoke notify:newrelic (first_time)
** Execute notify:newrelic
** Invoke notify:release_notes (first_time)
** Execute notify:release_notes

Solution

  • You need to add the stage to the command

    cap production deploy for production

    UPDATE

    It seems your deploy docs are missing the roles or servers to deploy to. You can find more info here.