dlss-capistrano 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +12 -0
- data/README.md +11 -0
- data/dlss-capistrano.gemspec +1 -1
- data/lib/dlss/capistrano.rb +1 -3
- data/lib/dlss/capistrano/tasks/bundled_sidekiq.rake +31 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 877a173e1e6e8e32cd4c48df5cf8b59011114d87994f5e747924cab409bf37d2
|
4
|
+
data.tar.gz: 5a0cc74142192b5e4c4a77809d318f0b4dcd138ecd488ff787e78de3ce2a8486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21fbedcc886454cd536e083edc07a73e38842e1bbd9dbaba00b1de9e8912b8eac2f7ef3bf902d5885f960199be7224ec6709c05c6b2da295d90118cfe6e54f21
|
7
|
+
data.tar.gz: 9dc3c858babe7710cef6f6a5b50878206bff508977048e226a54387b1f58cd84a5ccc9328e34b01a9c0f2a1a79e484b780d45aca23247db7e14a5ca46791a0d1
|
data/README.md
CHANGED
@@ -20,6 +20,17 @@ set :bundler2_config_path, '/tmp' # set to '#{shared_path}/bundle' by default
|
|
20
20
|
|
21
21
|
Note that only `bundler2_config_use_hook` **must** be set in order to use this functionality.
|
22
22
|
|
23
|
+
### Sidekiq symlink
|
24
|
+
|
25
|
+
Every time the version of Sidekiq or Ruby changes, a corresponding Puppet PR must be made in order to update the XSendFilePath that allows Apache to access the bundled Sidekiq gem's assets. dlss-capistrano provides a hook to create a symlink to the bundled Sidekiq to avoid having to do this:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
set :bundled_sidekiq_symlink, true # false is the default value
|
29
|
+
set :bundled_sidekiq_roles, [:app] # this is the default value
|
30
|
+
```
|
31
|
+
|
32
|
+
Set this in `config/deploy.rb` to automate the symlink creation, and then use `XSendFilePath /path/to/my/app/shared/bundled_sidekiq/web/assets` in Apache configuration (in Puppet).
|
33
|
+
|
23
34
|
### SSH
|
24
35
|
|
25
36
|
`cap ENV ssh` establishes an SSH connection to the host running in `ENV` environment, and changes into the current deployment directory
|
data/dlss-capistrano.gemspec
CHANGED
data/lib/dlss/capistrano.rb
CHANGED
@@ -2,6 +2,4 @@ require 'capistrano/one_time_key'
|
|
2
2
|
require 'capistrano/bundle_audit'
|
3
3
|
require 'capistrano/shared_configs'
|
4
4
|
|
5
|
-
|
6
|
-
load File.expand_path('../capistrano/tasks/sidekiq_systemd.rake', __FILE__)
|
7
|
-
load File.expand_path('../capistrano/tasks/ssh.rake', __FILE__)
|
5
|
+
Dir.glob("#{__dir__}/capistrano/tasks/*.rake").each { |r| import r }
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Capistrano plugin hook to set default values
|
2
|
+
namespace :load do
|
3
|
+
task :defaults do
|
4
|
+
set :bundled_sidekiq_symlink, fetch(:bundled_sidekiq_symlink, false)
|
5
|
+
set :bundled_sidekiq_roles, fetch(:bundled_sidekiq_roles, [:app])
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
# Integrate sidekiq-bundle hook into Capistrano
|
10
|
+
namespace :deploy do
|
11
|
+
before :starting, :add_bundled_sidekiq_hook do
|
12
|
+
invoke 'bundled_sidekiq:add_hook' if fetch(:bundled_sidekiq_symlink)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
namespace :bundled_sidekiq do
|
17
|
+
# NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
|
18
|
+
task :add_hook do
|
19
|
+
after 'bundler:install', 'bundled_sidekiq:symlink'
|
20
|
+
end
|
21
|
+
|
22
|
+
# NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
|
23
|
+
task :symlink do
|
24
|
+
on roles fetch(:bundled_sidekiq_roles) do
|
25
|
+
within release_path do
|
26
|
+
bundled_sidekiq_path = capture(:bundle, :info, '--path', :sidekiq)
|
27
|
+
execute(:ln, '-sf', bundled_sidekiq_path, "#{shared_path}/bundled_sidekiq")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dlss-capistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -76,6 +76,7 @@ executables: []
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
+
- ".github/pull_request_template.md"
|
79
80
|
- ".gitignore"
|
80
81
|
- Gemfile
|
81
82
|
- LICENSE
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- lib/dlss.rb
|
86
87
|
- lib/dlss/capistrano.rb
|
87
88
|
- lib/dlss/capistrano/tasks/bundle_config.rake
|
89
|
+
- lib/dlss/capistrano/tasks/bundled_sidekiq.rake
|
88
90
|
- lib/dlss/capistrano/tasks/sidekiq_systemd.rake
|
89
91
|
- lib/dlss/capistrano/tasks/ssh.rake
|
90
92
|
- lib/lyberteam-capistrano-devel.rb
|