kitchen-ec2 3.16.0 → 3.17.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: 765177643e317a19c906f4d74bbeab0df60e3b24f40b56cf96cc1784511a2204
4
- data.tar.gz: bdd75366f92fdfda91a3e6e07076cee7fc15eec5a4099bffb1e119d2abbe10c6
3
+ metadata.gz: a4993e5b97ddbe3fb98f8e58b9877bf90b3e0a165b521dc295d53dc9bcbbe192
4
+ data.tar.gz: 621bf0ddd53d9f8488ca6b7c351cf12c733cbcc534f23c30a3390b932fdc2e4e
5
5
  SHA512:
6
- metadata.gz: ae46afd545a7228e429ccfc23dc8e55ec1e1526853ba2977020934a2d394bf1beffe3006f9205f5a39f35704329a3d965c2fc65a828cc1d49e5e2fd89214eadb
7
- data.tar.gz: 2ba5bbfb8c4bbc9ac2dfd827f427dfb4ecc42d548aa5e7c6926fbb2bdc1dfa52904b06f0a76cac1f03fb174513e2b604970540020ee7c3b1b684dedf329684b7
6
+ metadata.gz: f62f3a41a041935cd4371e0cef514ec1a919f40ea8e21dc25bb84cec67dce7d97810469a3e220cc567daff040ba37da5cb026ddcb94aba0bdf86eec5adcffe6c
7
+ data.tar.gz: 7011bf26dc6e011af1af506b7ce9c42d5c26e1a19ff610896ed407200490d473b467dbf80a1260868e160e8d48da6792a1e0343dc5792eff2dbc09c7cee663fc
@@ -0,0 +1,52 @@
1
+ #
2
+ # Copyright:: 2023, Jared Kauppila
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ require_relative "../standard_platform"
17
+
18
+ module Kitchen
19
+ module Driver
20
+ class Aws
21
+ class StandardPlatform
22
+ # https://wiki.almalinux.org/cloud/AWS.html
23
+ class Alma < StandardPlatform
24
+ StandardPlatform.platforms["alma"] = self
25
+ StandardPlatform.platforms["almalinux"] = self
26
+
27
+ # default username for this platform's ami
28
+ # @return [String]
29
+ def username
30
+ "ec2-user"
31
+ end
32
+
33
+ def image_search
34
+ search = {
35
+ "owner-id" => "764336703387",
36
+ "name" => version ? "AlmaLinux OS #{version}*" : "AlmaLinux OS *",
37
+ }
38
+ search["architecture"] = architecture if architecture
39
+ search
40
+ end
41
+
42
+ def self.from_image(driver, image)
43
+ if /AlmaLinux OS/i.match?(image.name)
44
+ image.name =~ /\b(\d+(\.\d+)?)\b/i
45
+ new(driver, "alma", (Regexp.last_match || [])[1], image.architecture)
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,51 @@
1
+ #
2
+ # Copyright:: 2023, Jared Kauppila
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ require_relative "../standard_platform"
17
+
18
+ module Kitchen
19
+ module Driver
20
+ class Aws
21
+ class StandardPlatform
22
+ class Rocky < StandardPlatform
23
+ StandardPlatform.platforms["rocky"] = self
24
+ StandardPlatform.platforms["rockylinux"] = self
25
+
26
+ # default username for this platform's ami
27
+ # @return [String]
28
+ def username
29
+ "rocky"
30
+ end
31
+
32
+ def image_search
33
+ search = {
34
+ "owner-id" => "792107900819",
35
+ "name" => version ? "Rocky-#{version}-*" : "Rocky-*",
36
+ }
37
+ search["architecture"] = architecture if architecture
38
+ search
39
+ end
40
+
41
+ def self.from_image(driver, image)
42
+ if /Rocky-/i.match?(image.name)
43
+ image.name =~ /\b(\d+(\.\d+[\.\d])?)/i
44
+ new(driver, "rocky", (Regexp.last_match || [])[1], image.architecture)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -24,12 +24,14 @@ require_relative "aws/client"
24
24
  require_relative "aws/dedicated_hosts"
25
25
  require_relative "aws/instance_generator"
26
26
  require_relative "aws/standard_platform"
27
+ require_relative "aws/standard_platform/alma"
27
28
  require_relative "aws/standard_platform/amazon"
28
29
  require_relative "aws/standard_platform/amazon2"
29
30
  require_relative "aws/standard_platform/amazon2023"
30
31
  require_relative "aws/standard_platform/centos"
31
32
  require_relative "aws/standard_platform/debian"
32
33
  require_relative "aws/standard_platform/rhel"
34
+ require_relative "aws/standard_platform/rocky"
33
35
  require_relative "aws/standard_platform/fedora"
34
36
  require_relative "aws/standard_platform/freebsd"
35
37
  require_relative "aws/standard_platform/macos"
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for EC2 Test Kitchen driver
24
- EC2_VERSION = "3.16.0".freeze
24
+ EC2_VERSION = "3.17.0".freeze
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.16.0
4
+ version: 3.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-16 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -76,6 +76,7 @@ files:
76
76
  - lib/kitchen/driver/aws/dedicated_hosts.rb
77
77
  - lib/kitchen/driver/aws/instance_generator.rb
78
78
  - lib/kitchen/driver/aws/standard_platform.rb
79
+ - lib/kitchen/driver/aws/standard_platform/alma.rb
79
80
  - lib/kitchen/driver/aws/standard_platform/amazon.rb
80
81
  - lib/kitchen/driver/aws/standard_platform/amazon2.rb
81
82
  - lib/kitchen/driver/aws/standard_platform/amazon2023.rb
@@ -85,6 +86,7 @@ files:
85
86
  - lib/kitchen/driver/aws/standard_platform/freebsd.rb
86
87
  - lib/kitchen/driver/aws/standard_platform/macos.rb
87
88
  - lib/kitchen/driver/aws/standard_platform/rhel.rb
89
+ - lib/kitchen/driver/aws/standard_platform/rocky.rb
88
90
  - lib/kitchen/driver/aws/standard_platform/ubuntu.rb
89
91
  - lib/kitchen/driver/aws/standard_platform/windows.rb
90
92
  - lib/kitchen/driver/ec2.rb
@@ -108,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
110
  - !ruby/object:Gem::Version
109
111
  version: '0'
110
112
  requirements: []
111
- rubygems_version: 3.4.3
113
+ rubygems_version: 3.4.12
112
114
  signing_key:
113
115
  specification_version: 4
114
116
  summary: A Test Kitchen Driver for Amazon EC2