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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f61a7cc3d942cd53ef2efb22eadcfb60cced1deab57b0ef19398bc7efe78242
4
- data.tar.gz: 258611f43a7123defb8aabf8a05dd732bc79cd9fdd4443003b81f1db19969b88
3
+ metadata.gz: ef34189670d90583e896e138bb9d8de0647adcfbea6b9e9680de7de8d676bb77
4
+ data.tar.gz: f33d46261711274cfec41257f2d627d50ffb4e8bbe6c01b8dbbb899a7655f246
5
5
  SHA512:
6
- metadata.gz: ab36e35b6afcd985cb4d23d4b08f5486c85a74f006b5c9e80cce9cca7b80fb8cb172333c3a750391ec4d57807d60943c2b1b6d7e685cb97730f517958b506e2e
7
- data.tar.gz: bb22aef2c396ebfa35c5843caa3929e1ba2c03aba7284de2334bf631e864432083636b1963ea7a5355a89e20b272497272842acc72e0fcee7087354a2bdaf949
6
+ metadata.gz: 51334eff0a1cee5fe93b86da3e1494be9422ac9936bffbeaf3fa714a73618913593b688f602ee7edf29be6575a1ef4639901d707ad05448c5844cbdbd1d88deb
7
+ data.tar.gz: e25f26ef2ca81085af106b2708c7b13038e247e43c5c036e5c5a750f91f16989a771ce726f2efce0c80e2a45eecc99e86f20aac388cd344ede587faf47c1cd94
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
12
+ ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -1,12 +1,11 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
  - rubocop-rake
4
4
  - rubocop-rspec
5
- - rubocop-rspec_rails
6
5
 
7
6
  AllCops:
8
7
  NewCops: enable
9
- TargetRubyVersion: 2.7
8
+ TargetRubyVersion: 3.0
10
9
  DisplayCopNames: true
11
10
  DisplayStyleGuide: true
12
11
 
data/Gemfile CHANGED
@@ -11,4 +11,3 @@ gem 'rubocop', '~> 1.58'
11
11
  gem 'rubocop-performance', '~> 1.20'
12
12
  gem 'rubocop-rake', '~> 0.6'
13
13
  gem 'rubocop-rspec', '~> 3.0'
14
- gem 'rubocop-rspec_rails', '~> 2.30'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-asg-rolling (0.5.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.0)
19
- aws-partitions (1.989.0)
20
- aws-sdk-autoscaling (1.121.0)
21
- aws-sdk-core (~> 3, >= 3.207.0)
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.209.1)
23
+ aws-sdk-core (3.220.1)
24
24
  aws-eventstream (~> 1, >= 1.3.0)
25
- aws-partitions (~> 1, >= 1.651.0)
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.481.0)
29
- aws-sdk-core (~> 3, >= 3.207.0)
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.10.0)
32
+ aws-sigv4 (1.11.0)
32
33
  aws-eventstream (~> 1, >= 1.0.2)
33
34
  base64 (0.2.0)
34
- bigdecimal (3.1.8)
35
- capistrano (3.19.1)
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.4)
41
+ concurrent-ruby (1.3.5)
41
42
  crack (1.0.0)
42
43
  bigdecimal
43
44
  rexml
44
- diff-lcs (1.5.1)
45
- hashdiff (1.1.1)
46
- i18n (1.14.6)
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.7.2)
50
- language_server-protocol (3.17.0.3)
51
- net-scp (4.0.0)
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.0)
59
+ ostruct (0.6.1)
57
60
  parallel (1.26.3)
58
- parser (3.3.5.0)
61
+ parser (3.3.7.1)
59
62
  ast (~> 2.4.1)
60
63
  racc
61
- public_suffix (5.1.1)
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.9.2)
66
- rexml (3.3.8)
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.1)
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.1)
80
- rubocop (1.66.1)
82
+ rspec-support (3.13.2)
83
+ rubocop (1.74.0)
81
84
  json (~> 2.3)
82
- language_server-protocol (>= 3.17.0)
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.4, < 3.0)
87
- rubocop-ast (>= 1.32.2, < 2.0)
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, < 3.0)
90
- rubocop-ast (1.32.3)
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.22.1)
93
- rubocop (>= 1.48.1, < 2.0)
94
- rubocop-ast (>= 1.31.1, < 2.0)
95
- rubocop-rake (0.6.0)
96
- rubocop (~> 1.0)
97
- rubocop-rspec (3.1.0)
98
- rubocop (~> 1.61)
99
- rubocop-rspec_rails (2.30.0)
100
- rubocop (~> 1.61)
101
- rubocop-rspec (~> 3, >= 3.0.1)
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.23.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 (2.6.0)
110
- webmock (3.24.0)
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 = '>= 2.7.0'
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
@@ -3,7 +3,7 @@
3
3
  module Capistrano
4
4
  module ASG
5
5
  module Rolling
6
- VERSION = '0.5.0'
6
+ VERSION = '0.6.0'
7
7
  end
8
8
  end
9
9
  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 && (!ami.tag?('capistrano-asg-rolling:version') || !ami.tag?('capistrano-asg-rolling:gem-version'))
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.5.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: 2024-10-11 00:00:00.000000000 Z
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: 2.7.0
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.1.6
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