capistrano-asg-rolling 0.2.0 → 0.2.1
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/workflows/test.yml +1 -1
- data/.rubocop.yml +1 -1
- data/Gemfile +3 -3
- data/Gemfile.lock +58 -53
- data/capistrano-asg-rolling.gemspec +1 -1
- data/lib/capistrano/asg/rolling/ami.rb +3 -3
- data/lib/capistrano/asg/rolling/configuration.rb +8 -0
- data/lib/capistrano/asg/rolling/plugin.rb +2 -1
- data/lib/capistrano/asg/rolling/version.rb +1 -1
- data/lib/capistrano/asg/tasks/rolling.rake +18 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 201b0bf6f65154de3bef482b74683de12e689957f2776924b5b6b6187eb8523e
|
|
4
|
+
data.tar.gz: 182402f95b0dd18f6376566632b0712b8f049ca8fd67f454ce750be296e3cc5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfa3660b65b46f41fabe64ec8a5cc052189e4752ae2ac4a6635055c2b143595d0c402773e1255ddc6ff0b0ed3d6d83a53742abc5ed4ac7b42170b0ca268837a0
|
|
7
|
+
data.tar.gz: 36d6647e1bf5524b488c5b61dcd65cd6b14087d1ea8110a191496bc7127a0091002295375a380e3210622ded106a54442533c57443b0122b8f57f42d3bab5f5f
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -7,7 +7,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
|
7
7
|
# Specify your gem's dependencies in capistrano-asg-rolling.gemspec
|
|
8
8
|
gemspec
|
|
9
9
|
|
|
10
|
-
gem 'rubocop', '~> 1.
|
|
11
|
-
gem 'rubocop-performance', '~> 1.
|
|
10
|
+
gem 'rubocop', '~> 1.50.2'
|
|
11
|
+
gem 'rubocop-performance', '~> 1.17.0'
|
|
12
12
|
gem 'rubocop-rake', '~> 0.6.0'
|
|
13
|
-
gem 'rubocop-rspec', '~> 2.
|
|
13
|
+
gem 'rubocop-rspec', '~> 2.19.0'
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
capistrano-asg-rolling (0.2.
|
|
4
|
+
capistrano-asg-rolling (0.2.1)
|
|
5
5
|
aws-sdk-autoscaling (~> 1, >= 1.67.0)
|
|
6
6
|
aws-sdk-ec2 (~> 1)
|
|
7
7
|
capistrano (~> 3)
|
|
@@ -10,87 +10,92 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
addressable (2.8.
|
|
14
|
-
public_suffix (>= 2.0.2, <
|
|
15
|
-
airbrussh (1.4.
|
|
13
|
+
addressable (2.8.4)
|
|
14
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
15
|
+
airbrussh (1.4.1)
|
|
16
16
|
sshkit (>= 1.6.1, != 1.7.0)
|
|
17
17
|
ast (2.4.2)
|
|
18
18
|
aws-eventstream (1.2.0)
|
|
19
|
-
aws-partitions (1.
|
|
20
|
-
aws-sdk-autoscaling (1.
|
|
21
|
-
aws-sdk-core (~> 3, >= 3.
|
|
19
|
+
aws-partitions (1.748.0)
|
|
20
|
+
aws-sdk-autoscaling (1.89.0)
|
|
21
|
+
aws-sdk-core (~> 3, >= 3.165.0)
|
|
22
22
|
aws-sigv4 (~> 1.1)
|
|
23
|
-
aws-sdk-core (3.
|
|
23
|
+
aws-sdk-core (3.171.0)
|
|
24
24
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
25
|
-
aws-partitions (~> 1, >= 1.
|
|
25
|
+
aws-partitions (~> 1, >= 1.651.0)
|
|
26
|
+
aws-sigv4 (~> 1.5)
|
|
27
|
+
jmespath (~> 1, >= 1.6.1)
|
|
28
|
+
aws-sdk-ec2 (1.375.0)
|
|
29
|
+
aws-sdk-core (~> 3, >= 3.165.0)
|
|
26
30
|
aws-sigv4 (~> 1.1)
|
|
27
|
-
|
|
28
|
-
aws-sdk-ec2 (1.303.0)
|
|
29
|
-
aws-sdk-core (~> 3, >= 3.127.0)
|
|
30
|
-
aws-sigv4 (~> 1.1)
|
|
31
|
-
aws-sigv4 (1.4.0)
|
|
31
|
+
aws-sigv4 (1.5.2)
|
|
32
32
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
33
|
-
capistrano (3.17.
|
|
33
|
+
capistrano (3.17.2)
|
|
34
34
|
airbrussh (>= 1.0.0)
|
|
35
35
|
i18n
|
|
36
36
|
rake (>= 10.0.0)
|
|
37
37
|
sshkit (>= 1.9.0)
|
|
38
|
-
concurrent-ruby (1.
|
|
38
|
+
concurrent-ruby (1.2.2)
|
|
39
39
|
crack (0.4.5)
|
|
40
40
|
rexml
|
|
41
41
|
diff-lcs (1.5.0)
|
|
42
42
|
hashdiff (1.0.1)
|
|
43
|
-
i18n (1.
|
|
43
|
+
i18n (1.12.0)
|
|
44
44
|
concurrent-ruby (~> 1.0)
|
|
45
|
-
jmespath (1.6.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
jmespath (1.6.2)
|
|
46
|
+
json (2.6.3)
|
|
47
|
+
net-scp (4.0.0)
|
|
48
|
+
net-ssh (>= 2.6.5, < 8.0.0)
|
|
49
|
+
net-ssh (7.1.0)
|
|
50
|
+
parallel (1.22.1)
|
|
51
|
+
parser (3.2.2.0)
|
|
51
52
|
ast (~> 2.4.1)
|
|
52
|
-
public_suffix (
|
|
53
|
+
public_suffix (5.0.1)
|
|
53
54
|
rainbow (3.1.1)
|
|
54
55
|
rake (13.0.6)
|
|
55
|
-
regexp_parser (2.
|
|
56
|
+
regexp_parser (2.8.0)
|
|
56
57
|
rexml (3.2.5)
|
|
57
|
-
rspec (3.
|
|
58
|
-
rspec-core (~> 3.
|
|
59
|
-
rspec-expectations (~> 3.
|
|
60
|
-
rspec-mocks (~> 3.
|
|
61
|
-
rspec-core (3.
|
|
62
|
-
rspec-support (~> 3.
|
|
63
|
-
rspec-expectations (3.
|
|
58
|
+
rspec (3.12.0)
|
|
59
|
+
rspec-core (~> 3.12.0)
|
|
60
|
+
rspec-expectations (~> 3.12.0)
|
|
61
|
+
rspec-mocks (~> 3.12.0)
|
|
62
|
+
rspec-core (3.12.1)
|
|
63
|
+
rspec-support (~> 3.12.0)
|
|
64
|
+
rspec-expectations (3.12.2)
|
|
64
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
65
|
-
rspec-support (~> 3.
|
|
66
|
-
rspec-mocks (3.
|
|
66
|
+
rspec-support (~> 3.12.0)
|
|
67
|
+
rspec-mocks (3.12.5)
|
|
67
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
68
|
-
rspec-support (~> 3.
|
|
69
|
-
rspec-support (3.
|
|
70
|
-
rubocop (1.
|
|
69
|
+
rspec-support (~> 3.12.0)
|
|
70
|
+
rspec-support (3.12.0)
|
|
71
|
+
rubocop (1.50.2)
|
|
72
|
+
json (~> 2.3)
|
|
71
73
|
parallel (~> 1.10)
|
|
72
|
-
parser (>= 3.
|
|
74
|
+
parser (>= 3.2.0.0)
|
|
73
75
|
rainbow (>= 2.2.2, < 4.0)
|
|
74
76
|
regexp_parser (>= 1.8, < 3.0)
|
|
75
|
-
rexml
|
|
76
|
-
rubocop-ast (>= 1.
|
|
77
|
+
rexml (>= 3.2.5, < 4.0)
|
|
78
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
|
77
79
|
ruby-progressbar (~> 1.7)
|
|
78
|
-
unicode-display_width (>=
|
|
79
|
-
rubocop-ast (1.
|
|
80
|
-
parser (>= 3.
|
|
81
|
-
rubocop-
|
|
80
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
81
|
+
rubocop-ast (1.28.0)
|
|
82
|
+
parser (>= 3.2.1.0)
|
|
83
|
+
rubocop-capybara (2.17.1)
|
|
84
|
+
rubocop (~> 1.41)
|
|
85
|
+
rubocop-performance (1.17.1)
|
|
82
86
|
rubocop (>= 1.7.0, < 2.0)
|
|
83
87
|
rubocop-ast (>= 0.4.0)
|
|
84
88
|
rubocop-rake (0.6.0)
|
|
85
89
|
rubocop (~> 1.0)
|
|
86
|
-
rubocop-rspec (2.
|
|
87
|
-
rubocop (~> 1.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
rubocop-rspec (2.19.0)
|
|
91
|
+
rubocop (~> 1.33)
|
|
92
|
+
rubocop-capybara (~> 2.17)
|
|
93
|
+
ruby-progressbar (1.13.0)
|
|
94
|
+
sshkit (1.21.4)
|
|
90
95
|
net-scp (>= 1.1.2)
|
|
91
96
|
net-ssh (>= 2.8.0)
|
|
92
|
-
unicode-display_width (2.
|
|
93
|
-
webmock (3.
|
|
97
|
+
unicode-display_width (2.4.2)
|
|
98
|
+
webmock (3.18.1)
|
|
94
99
|
addressable (>= 2.8.0)
|
|
95
100
|
crack (>= 0.3.2)
|
|
96
101
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -103,10 +108,10 @@ DEPENDENCIES
|
|
|
103
108
|
capistrano-asg-rolling!
|
|
104
109
|
rake (~> 13.0)
|
|
105
110
|
rspec (~> 3.0)
|
|
106
|
-
rubocop (~> 1.
|
|
107
|
-
rubocop-performance (~> 1.
|
|
111
|
+
rubocop (~> 1.50.2)
|
|
112
|
+
rubocop-performance (~> 1.17.0)
|
|
108
113
|
rubocop-rake (~> 0.6.0)
|
|
109
|
-
rubocop-rspec (~> 2.
|
|
114
|
+
rubocop-rspec (~> 2.19.0)
|
|
110
115
|
webmock (~> 3.11)
|
|
111
116
|
|
|
112
117
|
BUNDLED WITH
|
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
27
|
spec.require_paths = ['lib']
|
|
28
28
|
|
|
29
|
-
spec.required_ruby_version = '>= 2.
|
|
29
|
+
spec.required_ruby_version = '>= 2.6.0'
|
|
30
30
|
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
32
32
|
spec.add_development_dependency 'rake', '~> 13.0'
|
|
@@ -61,12 +61,12 @@ module Capistrano
|
|
|
61
61
|
|
|
62
62
|
def snapshots
|
|
63
63
|
@snapshots ||= aws_ec2_image.block_device_mappings.map do |mapping|
|
|
64
|
-
Snapshot.new(mapping.ebs.snapshot_id)
|
|
65
|
-
end
|
|
64
|
+
Snapshot.new(mapping.ebs.snapshot_id) if mapping.ebs
|
|
65
|
+
end.compact
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def tags
|
|
69
|
-
@tags ||= aws_ec2_image.tags.
|
|
69
|
+
@tags ||= aws_ec2_image.tags.to_h { |tag| [tag.key, tag.value] }
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def tag?(key)
|
|
@@ -12,9 +12,10 @@ module Capistrano
|
|
|
12
12
|
#
|
|
13
13
|
class Plugin < Capistrano::Plugin
|
|
14
14
|
def set_defaults
|
|
15
|
-
set_if_empty :asg_rolling_group_name, ENV
|
|
15
|
+
set_if_empty :asg_rolling_group_name, ENV.fetch('asg_name', nil)
|
|
16
16
|
set_if_empty :asg_rolling_use_private_ip_address, true
|
|
17
17
|
set_if_empty :asg_rolling_verbose, true
|
|
18
|
+
set_if_empty :asg_rolling_update, true
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def register_hooks
|
|
@@ -45,7 +45,7 @@ namespace :rolling do
|
|
|
45
45
|
|
|
46
46
|
desc 'Update Auto Scaling Groups: create AMIs, update Launch Templates and start Instance Refresh'
|
|
47
47
|
task :update do
|
|
48
|
-
|
|
48
|
+
if config.rolling_update? && !config.instances.empty?
|
|
49
49
|
logger.info 'Stopping instance(s)...'
|
|
50
50
|
config.instances.stop
|
|
51
51
|
|
|
@@ -121,7 +121,24 @@ namespace :rolling do
|
|
|
121
121
|
end
|
|
122
122
|
else
|
|
123
123
|
logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?'
|
|
124
|
+
exit 1
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
desc 'Do a test deployment: run the deploy task but do not trigger the update ASG task and do not automatically terminate instances'
|
|
129
|
+
task :deploy_test do
|
|
130
|
+
config.rolling_update = false
|
|
131
|
+
|
|
132
|
+
if config.instances.any?
|
|
133
|
+
config.instances.each do |instance|
|
|
134
|
+
instance.auto_terminate = false
|
|
135
|
+
end
|
|
136
|
+
else
|
|
137
|
+
logger.error 'No instances have been launched. Are you using a configuration with rolling deployments?'
|
|
138
|
+
exit 1
|
|
124
139
|
end
|
|
140
|
+
|
|
141
|
+
invoke 'deploy'
|
|
125
142
|
end
|
|
126
143
|
|
|
127
144
|
desc 'Create an AMI from an Instance in the Auto Scaling Groups'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-asg-rolling
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kentaa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-04-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -180,14 +180,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
180
180
|
requirements:
|
|
181
181
|
- - ">="
|
|
182
182
|
- !ruby/object:Gem::Version
|
|
183
|
-
version: 2.
|
|
183
|
+
version: 2.6.0
|
|
184
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
requirements:
|
|
186
186
|
- - ">="
|
|
187
187
|
- !ruby/object:Gem::Version
|
|
188
188
|
version: '0'
|
|
189
189
|
requirements: []
|
|
190
|
-
rubygems_version: 3.
|
|
190
|
+
rubygems_version: 3.4.1
|
|
191
191
|
signing_key:
|
|
192
192
|
specification_version: 4
|
|
193
193
|
summary: Capistrano plugin for performing rolling updates to AWS Auto Scaling Groups
|