firespring_dev_commands 2.1.12.pre.alpha.1 → 2.1.12.pre.alpha.2
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/lib/firespring_dev_commands/aws/codepipeline.rb +4 -10
- data/lib/firespring_dev_commands/aws/parameter.rb +5 -13
- data/lib/firespring_dev_commands/aws.rb +12 -0
- data/lib/firespring_dev_commands/eol/aws.rb +72 -32
- data/lib/firespring_dev_commands/eol/product_version.rb +1 -3
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8993e41d585b29c955ea70b4dfae9a5c872cf86178187b9cde5ba1f081c3670
|
|
4
|
+
data.tar.gz: ce445cfe3aa1cb61ccf839041c82e4300671721f60e7c68d4df63a4042c06b8b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bfbf558bae2b57fff698f64219dba7e3e3c1dda9dd4876bb36668758653ab35d4bb305700e0da7ea3df50181b950f077167361a9724c761a039feb0e83be65a
|
|
7
|
+
data.tar.gz: 538965a55936c9b000a23b911a5b9cad7a50f0d005e94329281ad5e2ca9f43b807b08435813e75f240a37289cc2b5f545f223a52155bedfd4bfbe8d487bcb45d
|
|
@@ -21,16 +21,10 @@ module Dev
|
|
|
21
21
|
def pipelines(regex_match = nil)
|
|
22
22
|
raise 'regex_match must be a regexp' if regex_match && !regex_match.is_a?(Regexp)
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
next_token = response.next_token
|
|
29
|
-
while next_token
|
|
30
|
-
params[:next_token] = next_token
|
|
31
|
-
response = client.list_pipelines(params)
|
|
32
|
-
pipelines += response.pipelines
|
|
33
|
-
next_token = response.next_token
|
|
24
|
+
pipelines = [].tap do |ary|
|
|
25
|
+
Dev::Aws.each_page(client, :list_pipelines) do |response|
|
|
26
|
+
ary.concat(response.pipelines)
|
|
27
|
+
end
|
|
34
28
|
end
|
|
35
29
|
|
|
36
30
|
pipelines.select! { |it| it.name.match(regex_match) } if regex_match
|
|
@@ -24,20 +24,12 @@ module Dev
|
|
|
24
24
|
|
|
25
25
|
# Retrieve all parameters which start with the given path
|
|
26
26
|
def list(path, recursive: true, with_decryption: true)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
path:,
|
|
33
|
-
recursive:,
|
|
34
|
-
with_decryption:,
|
|
35
|
-
next_token:
|
|
36
|
-
)
|
|
37
|
-
parameters += response.parameters
|
|
38
|
-
break unless (next_token = response.next_token)
|
|
27
|
+
[].tap do |ary|
|
|
28
|
+
params = {path:, recursive:, with_decryption:}
|
|
29
|
+
Dev::Aws.each_page(client, :get_parameters_by_path, params) do |response|
|
|
30
|
+
ary.concat(response.parameters)
|
|
31
|
+
end
|
|
39
32
|
end
|
|
40
|
-
parameters
|
|
41
33
|
end
|
|
42
34
|
|
|
43
35
|
# Sets the given parameter name's value to the given value
|
|
@@ -9,5 +9,17 @@ module Dev
|
|
|
9
9
|
|
|
10
10
|
# The default role name used if none has been configured when logging in
|
|
11
11
|
DEFAULT_LOGIN_ROLE_NAME = 'ReadonlyAccessRole'.freeze
|
|
12
|
+
|
|
13
|
+
# Runs the query on the client with the parameters
|
|
14
|
+
# Yields each response page
|
|
15
|
+
def self.each_page(client, query, params = {})
|
|
16
|
+
response = client.send(query, params)
|
|
17
|
+
yield response
|
|
18
|
+
|
|
19
|
+
while response.next_page?
|
|
20
|
+
response = response.next_page
|
|
21
|
+
yield response
|
|
22
|
+
end
|
|
23
|
+
end
|
|
12
24
|
end
|
|
13
25
|
end
|
|
@@ -8,57 +8,97 @@ module Dev
|
|
|
8
8
|
class Aws
|
|
9
9
|
def elasticache_products
|
|
10
10
|
client = ::Aws::ElastiCache::Client.new
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
|
|
12
|
+
[].tap do |ary|
|
|
13
|
+
Dev::Aws.each_page(client, :describe_cache_clusters) do |response|
|
|
14
|
+
response.cache_clusters.each do |cluster|
|
|
15
|
+
name = cluster.cache_cluster_id
|
|
16
|
+
product = cluster.engine
|
|
17
|
+
version = cluster.engine_version.reverse.split('.')[-2..].join('.').reverse
|
|
18
|
+
ary << Dev::EndOfLife::ProductVersion.new(product, version, name)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
16
21
|
end
|
|
17
22
|
end
|
|
18
23
|
|
|
19
24
|
def lambda_products
|
|
20
25
|
client = ::Aws::Lambda::Client.new
|
|
21
|
-
client.list_functions.functions.filter_map do |function|
|
|
22
|
-
# Runtime is empty if using a docker image
|
|
23
|
-
next unless function.runtime
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
[].tap do |ary|
|
|
28
|
+
Dev::Aws.each_page(client, :list_functions) do |response|
|
|
29
|
+
response.functions.each do |function|
|
|
30
|
+
# Runtime is empty if using a docker image
|
|
31
|
+
# TODO Should we still handle this case?
|
|
32
|
+
next unless function.runtime
|
|
33
|
+
|
|
34
|
+
name = function.function_name
|
|
35
|
+
product = function&.runtime&.split(/[0-9]/, 2)&.first
|
|
36
|
+
version = function&.runtime&.split(/#{product}/, 2)&.last&.chomp('.x')
|
|
37
|
+
ary << Dev::EndOfLife::ProductVersion.new(product, version, name)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
29
40
|
end
|
|
30
41
|
end
|
|
31
42
|
|
|
32
43
|
def opensearch_products
|
|
33
44
|
client = ::Aws::OpenSearchService::Client.new
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
|
|
46
|
+
[].tap do |ary|
|
|
47
|
+
Dev::Aws.each_page(client, :list_domain_names) do |response|
|
|
48
|
+
response.domain_names.each do |domain|
|
|
49
|
+
name = domain.domain_name
|
|
50
|
+
product = domain.engine_type
|
|
51
|
+
version = client.describe_domain(domain_name: name).domain_status.engine_version.split('_').last.split('.').first
|
|
52
|
+
ary << Dev::EndOfLife::ProductVersion.new(product, version, name)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
39
55
|
end
|
|
40
56
|
end
|
|
41
57
|
|
|
42
58
|
def rds_products
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
_rds_instances + _rds_clusters
|
|
60
|
+
end
|
|
45
61
|
|
|
62
|
+
def _rds_instances
|
|
63
|
+
aws_engines = %w(mysql postgresql)
|
|
46
64
|
client = ::Aws::RDS::Client.new
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
|
|
66
|
+
[].tap do |ary|
|
|
67
|
+
Dev::Aws.each_page(client, :describe_db_instances) do |response|
|
|
68
|
+
response.db_instances.each do |instance|
|
|
69
|
+
name = instance.db_instance_identifier
|
|
70
|
+
engine = instance.engine.tr('aurora-', '')
|
|
71
|
+
product = if aws_engines.include?(engine)
|
|
72
|
+
"amazon-rds-#{engine}"
|
|
73
|
+
else
|
|
74
|
+
engine
|
|
75
|
+
end
|
|
76
|
+
version = instance.engine_version.reverse.split('.')[-2..].join('.').reverse
|
|
77
|
+
ary << Dev::EndOfLife::ProductVersion.new(product, version, name)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
59
80
|
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def _rds_clusters
|
|
84
|
+
aws_engines = %w(mysql postgresql)
|
|
85
|
+
client = ::Aws::RDS::Client.new
|
|
60
86
|
|
|
61
|
-
|
|
87
|
+
[].tap do |ary|
|
|
88
|
+
Dev::Aws.each_page(client, :describe_db_clusters) do |response|
|
|
89
|
+
response.db_clusters.each do |cluster|
|
|
90
|
+
name = cluster.db_cluster_identifier
|
|
91
|
+
engine = cluster.engine.tr('aurora-', '')
|
|
92
|
+
product = if aws_engines.include?(engine)
|
|
93
|
+
"amazon-rds-#{engine}"
|
|
94
|
+
else
|
|
95
|
+
engine
|
|
96
|
+
end
|
|
97
|
+
version = cluster.engine_version.reverse.split('.')[-2..].join('.').reverse
|
|
98
|
+
ary << Dev::EndOfLife::ProductVersion.new(product, version, name)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
62
102
|
end
|
|
63
103
|
end
|
|
64
104
|
end
|
|
@@ -55,9 +55,7 @@ module Dev
|
|
|
55
55
|
# If EOL info is a boolean or missing from the current details, overwrite with the manual date (if present)
|
|
56
56
|
manual_date = Dev::EndOfLife.config.manual_dates["#{product}_#{cycle.tr('.', '_')}".to_sym]
|
|
57
57
|
detail['eol'] = manual_date if manual_date && (detail['eol'].boolean? || detail['eol'].nil?)
|
|
58
|
-
|
|
59
|
-
raise "unable to query eol detail for #{name}, #{cycle}" if detail.empty?
|
|
60
|
-
|
|
58
|
+
detail['eol'] = '1979-01-01' if detail.empty?
|
|
61
59
|
detail
|
|
62
60
|
end
|
|
63
61
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: firespring_dev_commands
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.12.pre.alpha.
|
|
4
|
+
version: 2.1.12.pre.alpha.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Firespring
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|