dlss-capistrano 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1702874c90a70b558db39872139922c1bc1f513813925c50c378cf3eac575f24
4
- data.tar.gz: 1a4c30ef36c1ccf64c9883bd0b0cced6aee568958db25d74160c1d7e71ed025d
3
+ metadata.gz: 901bfd4d7fc52ef598ccc895d59ab656abc1db5948f9b5284f4bc8ec1207ffcc
4
+ data.tar.gz: be31f24d058ecd802089e529bcfe1b9b5fde124dd97076ab83b10e6304281d19
5
5
  SHA512:
6
- metadata.gz: b9ab79dc66765e0c794966b6e6969d060d8c3f8de8b9bcac19c659f0630da6a85b5ae8b474257f98fb71313ed103938dd2d1dbdb736ca34b15e421be928f5fc7
7
- data.tar.gz: 427abdeb794947a38336829bcd5cd3ad9b7bc5b64f0e262f98cfc52bdc4485196a3fdfa74a30fe91150ba63fa856034dfc307fc6c87a39e433134d2e289540c5
6
+ metadata.gz: 7bd2d019fe195682620b150ebe4b1254496121634a3bff59371cdc078f4b15342853205c925cbf8b2b5a7a968dd935f9c3c567ca3064b0a5d436f93fa41fd241
7
+ data.tar.gz: 55647ad42dee03eab7cc98f334892d78f312b4cfb9fb9ca1576816b46970535738f9abd1380ae71174c317275771e38c09b21c484e96385e260dbe66856f290c
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "dlss-capistrano"
7
- s.version = '4.1.0'
7
+ s.version = '4.2.0'
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["Chris Beer", 'Mike Giarlo']
@@ -21,7 +21,7 @@ namespace :bundled_sidekiq do
21
21
 
22
22
  # NOTE: no `desc` here to avoid publishing this task in the `cap -T` list
23
23
  task :symlink do
24
- on roles fetch(:bundled_sidekiq_roles) do
24
+ on roles(fetch(:bundled_sidekiq_roles)) do
25
25
  within release_path do
26
26
  bundled_sidekiq_path = capture(:bundle, :info, '--path', :sidekiq)
27
27
  execute(:ln, '-sf', bundled_sidekiq_path, "#{shared_path}/bundled_sidekiq")
@@ -8,14 +8,18 @@ end
8
8
 
9
9
  desc 'Run status checks'
10
10
  task :check_status do
11
- on roles fetch(:check_status_roles), in: :sequence do |host|
11
+ on roles(fetch(:check_status_roles)), in: :sequence do |host|
12
12
  status_url = "https://#{host}#{fetch(:check_status_path)}"
13
13
 
14
14
  info "Checking status at #{status_url}"
15
15
  status_body = capture("curl #{status_url}")
16
16
 
17
- if status_body.match?(/FAILED/)
17
+ if status_body.nil?
18
+ error 'Endpoint could not be reached'
19
+ elsif status_body.match?(/FAILED/)
18
20
  error status_body.lines.grep(/FAILED/).join
21
+ elsif !status_body.match?(/PASSED/)
22
+ error status_body
19
23
  else
20
24
  info SSHKit::Color.new($stdout).colorize('All checks passed!', :green)
21
25
  end
@@ -24,28 +24,28 @@ namespace :sidekiq_systemd do
24
24
 
25
25
  desc 'Stop workers from picking up new jobs'
26
26
  task :quiet do
27
- on roles fetch(:sidekiq_systemd_role) do
27
+ on roles(fetch(:sidekiq_systemd_role)) do
28
28
  sudo :systemctl, 'reload', 'sidekiq-*', raise_on_non_zero_exit: false
29
29
  end
30
30
  end
31
31
 
32
32
  desc 'Stop running workers gracefully'
33
33
  task :stop do
34
- on roles fetch(:sidekiq_systemd_role) do
34
+ on roles(fetch(:sidekiq_systemd_role)) do
35
35
  sudo :systemctl, 'stop', 'sidekiq-*'
36
36
  end
37
37
  end
38
38
 
39
39
  desc 'Start workers'
40
40
  task :start do
41
- on roles fetch(:sidekiq_systemd_role) do
41
+ on roles(fetch(:sidekiq_systemd_role)) do
42
42
  sudo :systemctl, 'start', 'sidekiq-*', '--all'
43
43
  end
44
44
  end
45
45
 
46
46
  desc 'Restart workers'
47
47
  task :restart do
48
- on roles fetch(:sidekiq_systemd_role) do
48
+ on roles(fetch(:sidekiq_systemd_role)) do
49
49
  sudo :systemctl, 'restart', 'sidekiq-*', raise_on_non_zero_exit: false
50
50
  end
51
51
  end
@@ -23,21 +23,21 @@ namespace :sneakers_systemd do
23
23
 
24
24
  desc 'Stop running workers gracefully'
25
25
  task :stop do
26
- on roles fetch(:sneakers_systemd_role) do
26
+ on roles(fetch(:sneakers_systemd_role)) do
27
27
  sudo :systemctl, 'stop', 'sneakers'
28
28
  end
29
29
  end
30
30
 
31
31
  desc 'Start workers'
32
32
  task :start do
33
- on roles fetch(:sneakers_systemd_role) do
33
+ on roles(fetch(:sneakers_systemd_role)) do
34
34
  sudo :systemctl, 'start', 'sneakers'
35
35
  end
36
36
  end
37
37
 
38
38
  desc 'Restart workers'
39
39
  task :restart do
40
- on roles fetch(:sneakers_systemd_role) do
40
+ on roles(fetch(:sneakers_systemd_role)) do
41
41
  sudo :systemctl, 'restart', 'sneakers', raise_on_non_zero_exit: false
42
42
  end
43
43
  end
@@ -0,0 +1,12 @@
1
+ desc "ssh to the current directory on the server"
2
+ task :update_global_strscan do
3
+ on roles(:app) do |host|
4
+ strscan_version = within release_path do
5
+ capture(:bundle, 'exec', 'ruby', '-e', '"puts Gem::Specification.find_by_name(\'strscan\').version"')
6
+ end
7
+
8
+ execute "gem install strscan --silent --no-document -v #{strscan_version}"
9
+ end
10
+ end
11
+
12
+ before :'passenger:restart', :update_global_strscan
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlss-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  - Mike Giarlo
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-06 00:00:00.000000000 Z
12
+ date: 2022-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -95,12 +95,13 @@ files:
95
95
  - lib/dlss/capistrano/tasks/sneakers_systemd.rake
96
96
  - lib/dlss/capistrano/tasks/ssh.rake
97
97
  - lib/dlss/capistrano/tasks/ssh_check.rake
98
+ - lib/dlss/capistrano/tasks/strscan.rake
98
99
  - lib/lyberteam-capistrano-devel.rb
99
- homepage:
100
+ homepage:
100
101
  licenses:
101
102
  - Apache-2.0
102
103
  metadata: {}
103
- post_install_message:
104
+ post_install_message:
104
105
  rdoc_options: []
105
106
  require_paths:
106
107
  - lib
@@ -115,8 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  - !ruby/object:Gem::Version
116
117
  version: 1.3.6
117
118
  requirements: []
118
- rubygems_version: 3.2.32
119
- signing_key:
119
+ rubygems_version: 3.3.7
120
+ signing_key:
120
121
  specification_version: 4
121
122
  summary: Capistrano recipes for use in SUL/DLSS projects
122
123
  test_files: []