Sha256: c4d953da8b3d3fe7ad5fa0521320bfc0b0d76bb18b193ea71868bfdad49d6ce1

Contents?: true

Size: 988 Bytes

Versions: 17

Compression:

Stored size: 988 Bytes

Contents

# Capistrano plugin hook to set default values
namespace :load do
  task :defaults do
    set :bundled_sidekiq_symlink, fetch(:bundled_sidekiq_symlink, false)
    set :bundled_sidekiq_roles, fetch(:bundled_sidekiq_roles, [:app])
  end
end

# Integrate sidekiq-bundle hook into Capistrano
namespace :deploy do
  before :starting, :add_bundled_sidekiq_hook do
    invoke 'bundled_sidekiq:add_hook' if fetch(:bundled_sidekiq_symlink)
  end
end

namespace :bundled_sidekiq do
  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
  task :add_hook do
    after 'bundler:install', 'bundled_sidekiq:symlink'
  end

  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
  task :symlink do
    on roles(fetch(:bundled_sidekiq_roles)) do
      within release_path do
        bundled_sidekiq_path = capture(:bundle, :info, '--path', :sidekiq)
        execute(:ln, '-sf', bundled_sidekiq_path, "#{shared_path}/bundled_sidekiq")
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
dlss-capistrano-5.3.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.2.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.1.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.1.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.0.4 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.0.3 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.0.2 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.0.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-5.0.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.4.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.4.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.3.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.3.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.2.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.2.0 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.1.2 lib/dlss/capistrano/tasks/bundled_sidekiq.rake
dlss-capistrano-4.1.1 lib/dlss/capistrano/tasks/bundled_sidekiq.rake