capistrano-asg-rolling 0.5.0 → 0.6.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/workflows/test.yml +1 -1
- data/.rubocop.yml +2 -3
- data/Gemfile +0 -1
- data/Gemfile.lock +52 -46
- data/README.md +7 -0
- data/capistrano-asg-rolling.gemspec +1 -1
- data/lib/capistrano/asg/rolling/autoscale_group.rb +6 -1
- data/lib/capistrano/asg/rolling/tags.rb +6 -1
- data/lib/capistrano/asg/rolling/version.rb +1 -1
- data/lib/capistrano/asg/tasks/rolling.rake +1 -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: ef34189670d90583e896e138bb9d8de0647adcfbea6b9e9680de7de8d676bb77
|
4
|
+
data.tar.gz: f33d46261711274cfec41257f2d627d50ffb4e8bbe6c01b8dbbb899a7655f246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51334eff0a1cee5fe93b86da3e1494be9422ac9936bffbeaf3fa714a73618913593b688f602ee7edf29be6575a1ef4639901d707ad05448c5844cbdbd1d88deb
|
7
|
+
data.tar.gz: e25f26ef2ca81085af106b2708c7b13038e247e43c5c036e5c5a750f91f16989a771ce726f2efce0c80e2a45eecc99e86f20aac388cd344ede587faf47c1cd94
|
data/.github/workflows/test.yml
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
capistrano-asg-rolling (0.
|
4
|
+
capistrano-asg-rolling (0.6.0)
|
5
5
|
aws-sdk-autoscaling (~> 1, >= 1.100.0)
|
6
6
|
aws-sdk-ec2 (~> 1)
|
7
7
|
capistrano (~> 3)
|
@@ -15,60 +15,63 @@ GEM
|
|
15
15
|
airbrussh (1.5.3)
|
16
16
|
sshkit (>= 1.6.1, != 1.7.0)
|
17
17
|
ast (2.4.2)
|
18
|
-
aws-eventstream (1.3.
|
19
|
-
aws-partitions (1.
|
20
|
-
aws-sdk-autoscaling (1.
|
21
|
-
aws-sdk-core (~> 3, >= 3.
|
18
|
+
aws-eventstream (1.3.2)
|
19
|
+
aws-partitions (1.1066.0)
|
20
|
+
aws-sdk-autoscaling (1.132.0)
|
21
|
+
aws-sdk-core (~> 3, >= 3.216.0)
|
22
22
|
aws-sigv4 (~> 1.5)
|
23
|
-
aws-sdk-core (3.
|
23
|
+
aws-sdk-core (3.220.1)
|
24
24
|
aws-eventstream (~> 1, >= 1.3.0)
|
25
|
-
aws-partitions (~> 1, >= 1.
|
25
|
+
aws-partitions (~> 1, >= 1.992.0)
|
26
26
|
aws-sigv4 (~> 1.9)
|
27
|
+
base64
|
27
28
|
jmespath (~> 1, >= 1.6.1)
|
28
|
-
aws-sdk-ec2 (1.
|
29
|
-
aws-sdk-core (~> 3, >= 3.
|
29
|
+
aws-sdk-ec2 (1.512.0)
|
30
|
+
aws-sdk-core (~> 3, >= 3.216.0)
|
30
31
|
aws-sigv4 (~> 1.5)
|
31
|
-
aws-sigv4 (1.
|
32
|
+
aws-sigv4 (1.11.0)
|
32
33
|
aws-eventstream (~> 1, >= 1.0.2)
|
33
34
|
base64 (0.2.0)
|
34
|
-
bigdecimal (3.1.
|
35
|
-
capistrano (3.19.
|
35
|
+
bigdecimal (3.1.9)
|
36
|
+
capistrano (3.19.2)
|
36
37
|
airbrussh (>= 1.0.0)
|
37
38
|
i18n
|
38
39
|
rake (>= 10.0.0)
|
39
40
|
sshkit (>= 1.9.0)
|
40
|
-
concurrent-ruby (1.3.
|
41
|
+
concurrent-ruby (1.3.5)
|
41
42
|
crack (1.0.0)
|
42
43
|
bigdecimal
|
43
44
|
rexml
|
44
|
-
diff-lcs (1.
|
45
|
-
hashdiff (1.1.
|
46
|
-
i18n (1.14.
|
45
|
+
diff-lcs (1.6.0)
|
46
|
+
hashdiff (1.1.2)
|
47
|
+
i18n (1.14.7)
|
47
48
|
concurrent-ruby (~> 1.0)
|
48
49
|
jmespath (1.6.2)
|
49
|
-
json (2.
|
50
|
-
language_server-protocol (3.17.0.
|
51
|
-
|
50
|
+
json (2.10.2)
|
51
|
+
language_server-protocol (3.17.0.4)
|
52
|
+
lint_roller (1.1.0)
|
53
|
+
logger (1.6.6)
|
54
|
+
net-scp (4.1.0)
|
52
55
|
net-ssh (>= 2.6.5, < 8.0.0)
|
53
56
|
net-sftp (4.0.0)
|
54
57
|
net-ssh (>= 5.0.0, < 8.0.0)
|
55
58
|
net-ssh (7.3.0)
|
56
|
-
ostruct (0.6.
|
59
|
+
ostruct (0.6.1)
|
57
60
|
parallel (1.26.3)
|
58
|
-
parser (3.3.
|
61
|
+
parser (3.3.7.1)
|
59
62
|
ast (~> 2.4.1)
|
60
63
|
racc
|
61
|
-
public_suffix (
|
64
|
+
public_suffix (6.0.1)
|
62
65
|
racc (1.8.1)
|
63
66
|
rainbow (3.1.1)
|
64
67
|
rake (13.2.1)
|
65
|
-
regexp_parser (2.
|
66
|
-
rexml (3.
|
68
|
+
regexp_parser (2.10.0)
|
69
|
+
rexml (3.4.1)
|
67
70
|
rspec (3.13.0)
|
68
71
|
rspec-core (~> 3.13.0)
|
69
72
|
rspec-expectations (~> 3.13.0)
|
70
73
|
rspec-mocks (~> 3.13.0)
|
71
|
-
rspec-core (3.13.
|
74
|
+
rspec-core (3.13.3)
|
72
75
|
rspec-support (~> 3.13.0)
|
73
76
|
rspec-expectations (3.13.3)
|
74
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -76,38 +79,42 @@ GEM
|
|
76
79
|
rspec-mocks (3.13.2)
|
77
80
|
diff-lcs (>= 1.2.0, < 2.0)
|
78
81
|
rspec-support (~> 3.13.0)
|
79
|
-
rspec-support (3.13.
|
80
|
-
rubocop (1.
|
82
|
+
rspec-support (3.13.2)
|
83
|
+
rubocop (1.74.0)
|
81
84
|
json (~> 2.3)
|
82
|
-
language_server-protocol (
|
85
|
+
language_server-protocol (~> 3.17.0.2)
|
86
|
+
lint_roller (~> 1.1.0)
|
83
87
|
parallel (~> 1.10)
|
84
88
|
parser (>= 3.3.0.2)
|
85
89
|
rainbow (>= 2.2.2, < 4.0)
|
86
|
-
regexp_parser (>= 2.
|
87
|
-
rubocop-ast (>= 1.
|
90
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
91
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
88
92
|
ruby-progressbar (~> 1.7)
|
89
|
-
unicode-display_width (>= 2.4.0, <
|
90
|
-
rubocop-ast (1.
|
93
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
94
|
+
rubocop-ast (1.38.1)
|
91
95
|
parser (>= 3.3.1.0)
|
92
|
-
rubocop-performance (1.
|
93
|
-
|
94
|
-
rubocop
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
rubocop (
|
99
|
-
rubocop-
|
100
|
-
|
101
|
-
rubocop
|
96
|
+
rubocop-performance (1.24.0)
|
97
|
+
lint_roller (~> 1.1)
|
98
|
+
rubocop (>= 1.72.1, < 2.0)
|
99
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
100
|
+
rubocop-rake (0.7.1)
|
101
|
+
lint_roller (~> 1.1)
|
102
|
+
rubocop (>= 1.72.1)
|
103
|
+
rubocop-rspec (3.5.0)
|
104
|
+
lint_roller (~> 1.1)
|
105
|
+
rubocop (~> 1.72, >= 1.72.1)
|
102
106
|
ruby-progressbar (1.13.0)
|
103
|
-
sshkit (1.
|
107
|
+
sshkit (1.24.0)
|
104
108
|
base64
|
109
|
+
logger
|
105
110
|
net-scp (>= 1.1.2)
|
106
111
|
net-sftp (>= 2.1.2)
|
107
112
|
net-ssh (>= 2.8.0)
|
108
113
|
ostruct
|
109
|
-
unicode-display_width (
|
110
|
-
|
114
|
+
unicode-display_width (3.1.4)
|
115
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
116
|
+
unicode-emoji (4.0.4)
|
117
|
+
webmock (3.25.1)
|
111
118
|
addressable (>= 2.8.0)
|
112
119
|
crack (>= 0.3.2)
|
113
120
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -124,7 +131,6 @@ DEPENDENCIES
|
|
124
131
|
rubocop-performance (~> 1.20)
|
125
132
|
rubocop-rake (~> 0.6)
|
126
133
|
rubocop-rspec (~> 3.0)
|
127
|
-
rubocop-rspec_rails (~> 2.30)
|
128
134
|
webmock (~> 3.11)
|
129
135
|
|
130
136
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -106,6 +106,13 @@ set :asg_wait_for_instance_refresh, true
|
|
106
106
|
set :asg_instance_refresh_polling_interval, 30 # default
|
107
107
|
```
|
108
108
|
|
109
|
+
Enable or disable auto-rollback on instance refreshes (default: false):
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
# config/deploy.rb
|
113
|
+
set :asg_instance_refresh_auto_rollback, true
|
114
|
+
```
|
115
|
+
|
109
116
|
## Usage
|
110
117
|
|
111
118
|
Specify the Auto Scaling Groups with the keyword `autoscale` instead of using the `server` keyword in Capistrano's stage configuration. Provide the name of the Auto Scaling Group and any properties you want to pass to the server:
|
@@ -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 = '>=
|
29
|
+
spec.required_ruby_version = '>= 3.0.0'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
32
32
|
spec.add_development_dependency 'rake', '~> 13.0'
|
@@ -55,6 +55,10 @@ module Capistrano
|
|
55
55
|
properties.fetch(:min_healthy_percentage, nil)
|
56
56
|
end
|
57
57
|
|
58
|
+
def auto_rollback
|
59
|
+
properties.fetch(:asg_instance_refresh_auto_rollback, nil)
|
60
|
+
end
|
61
|
+
|
58
62
|
def max_healthy_percentage
|
59
63
|
properties.fetch(:max_healthy_percentage, nil)
|
60
64
|
end
|
@@ -73,7 +77,8 @@ module Capistrano
|
|
73
77
|
instance_warmup: instance_warmup_time,
|
74
78
|
skip_matching: true,
|
75
79
|
min_healthy_percentage: min_healthy_percentage,
|
76
|
-
max_healthy_percentage: max_healthy_percentage
|
80
|
+
max_healthy_percentage: max_healthy_percentage,
|
81
|
+
auto_rollback: auto_rollback
|
77
82
|
}.compact
|
78
83
|
).instance_refresh_id
|
79
84
|
rescue Aws::AutoScaling::Errors::InstanceRefreshInProgress => e
|
@@ -9,7 +9,7 @@ module Capistrano
|
|
9
9
|
|
10
10
|
# The tags to add to an AMI.
|
11
11
|
def ami_tags
|
12
|
-
application_tags.merge(deployment_tags).merge(gem_tags)
|
12
|
+
application_tags.merge(deployment_tags).merge(gem_tags).merge(custom_tags)
|
13
13
|
end
|
14
14
|
|
15
15
|
# Tags related to the current application / stage.
|
@@ -36,6 +36,11 @@ module Capistrano
|
|
36
36
|
'capistrano-asg-rolling:gem-version' => Capistrano::ASG::Rolling::VERSION
|
37
37
|
}
|
38
38
|
end
|
39
|
+
|
40
|
+
# Custom added tags.
|
41
|
+
def custom_tags
|
42
|
+
fetch(:asg_rolling_ami_tags) || {}
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
@@ -91,7 +91,7 @@ namespace :rolling do
|
|
91
91
|
end
|
92
92
|
|
93
93
|
# Only clean up when AMI was tagged by us.
|
94
|
-
next if exists &&
|
94
|
+
next if exists && !ami.tag?('capistrano-asg-rolling:version') && !ami.tag?('capistrano-asg-rolling:gem-version')
|
95
95
|
|
96
96
|
logger.verbose "Deleting Launch Template **#{version.name}** version **#{version.version}**..."
|
97
97
|
version.delete
|
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.
|
4
|
+
version: 0.6.0
|
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: 2025-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -181,14 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: 3.0.0
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
191
|
+
rubygems_version: 3.2.33
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: Capistrano plugin for performing rolling updates to AWS Auto Scaling Groups
|