puppet_metadata 1.10.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -29
- data/lib/puppet_metadata/aio.rb +12 -10
- data/lib/puppet_metadata/beaker.rb +1 -1
- data/lib/puppet_metadata/github_actions.rb +0 -13
- data/lib/puppet_metadata/metadata.rb +0 -19
- data/lib/puppet_metadata/operatingsystem.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0764d746b3167ac13197106bbff4b5c0be055c96f512aa5e43461bb4aa69ccc5
|
4
|
+
data.tar.gz: 04635ef0d16094eb0728c6c8ae49ed6f63daa141e8fd434d9a58e8f6805273ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6881e7df1e75a1324915a1cba67040cec62bbc7e6852aaefd14953345d3eed760fb9dcede23d97e2435624642dfb9d4f858bc9fe8c1ee8f852dcdae5672250b
|
7
|
+
data.tar.gz: 16c8b9c86ff5c4e8006e759972da86c69cdcc1fd5276435560cee6030425d53ea40369599e384f7da76f5bcd991adb942261faf20e7587979d85c7bb72edd3e3
|
data/README.md
CHANGED
@@ -15,60 +15,66 @@ The gem intends to provide an abstraction over Puppet's metadata.json file. Its
|
|
15
15
|
To get outputs [usable in Github Actions](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions), there is the `metadata2gha` command available. This generates based on metadata.json, such as [Beaker](https://github.com/voxpupuli/beaker) setfiles, Puppet major versions and a Puppet unit test matrix.
|
16
16
|
|
17
17
|
```console
|
18
|
-
$ metadata2gha
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
$ metadata2gha
|
19
|
+
puppet_major_versions=[{"name":"Puppet 7","value":7,"collection":"puppet7"},{"name":"Puppet 6","value":6,"collection":"puppet6"}]
|
20
|
+
puppet_unit_test_matrix=[{"puppet":7,"ruby":"2.7"},{"puppet":6,"ruby":"2.5"}]
|
21
|
+
github_action_test_matrix=[{"setfile":{"name":"Debian 11","value":"debian11-64"},"puppet":{"name":"Puppet 7","value":7,"collection":"puppet7"}},{"setfile":{"name":"Debian 11","value":"debian11-64"},"puppet":{"name":"Puppet 6","value":6,"collection":"puppet6"}}]
|
22
22
|
```
|
23
23
|
|
24
|
-
|
24
|
+
Puppet major versions formatted for readability:
|
25
25
|
```json
|
26
26
|
[
|
27
27
|
{
|
28
|
-
"name": "
|
29
|
-
"value":
|
30
|
-
|
31
|
-
{
|
32
|
-
"name": "CentOS 8",
|
33
|
-
"value": "centos8-64"
|
28
|
+
"name": "Puppet 7",
|
29
|
+
"value": 7,
|
30
|
+
"collection": "puppet7"
|
34
31
|
},
|
35
32
|
{
|
36
|
-
"name": "
|
37
|
-
"value":
|
38
|
-
|
39
|
-
{
|
40
|
-
"name": "Ubuntu 18.04",
|
41
|
-
"value": "ubuntu1804-64"
|
33
|
+
"name": "Puppet 6",
|
34
|
+
"value": 6,
|
35
|
+
"collection": "puppet6"
|
42
36
|
}
|
43
37
|
]
|
44
38
|
```
|
45
39
|
|
46
|
-
Puppet
|
40
|
+
Puppet unit test matrix formatted for readability:
|
47
41
|
```json
|
48
42
|
[
|
49
43
|
{
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"collection": "puppet6"
|
44
|
+
"puppet": 7,
|
45
|
+
"ruby": "2.7"
|
53
46
|
},
|
54
47
|
{
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"collection": "puppet5"
|
48
|
+
"puppet": 6,
|
49
|
+
"ruby": "2.5"
|
58
50
|
}
|
59
51
|
]
|
60
52
|
```
|
61
53
|
|
62
|
-
|
54
|
+
GitHub Action test matrix formatted for readability
|
63
55
|
```json
|
64
56
|
[
|
65
57
|
{
|
66
|
-
"
|
67
|
-
|
58
|
+
"setfile": {
|
59
|
+
"name": "Debian 11",
|
60
|
+
"value": "debian11-64"
|
61
|
+
},
|
62
|
+
"puppet": {
|
63
|
+
"name": "Puppet 7",
|
64
|
+
"value": 7,
|
65
|
+
"collection": "puppet7"
|
66
|
+
}
|
68
67
|
},
|
69
68
|
{
|
70
|
-
"
|
71
|
-
|
69
|
+
"setfile": {
|
70
|
+
"name": "Debian 11",
|
71
|
+
"value": "debian11-64"
|
72
|
+
},
|
73
|
+
"puppet": {
|
74
|
+
"name": "Puppet 6",
|
75
|
+
"value": 6,
|
76
|
+
"collection": "puppet6"
|
77
|
+
}
|
72
78
|
}
|
73
79
|
]
|
74
80
|
```
|
data/lib/puppet_metadata/aio.rb
CHANGED
@@ -14,9 +14,9 @@ module PuppetMetadata
|
|
14
14
|
'RedHat' => {
|
15
15
|
'5' => 5..7,
|
16
16
|
'6' => 5..7,
|
17
|
-
'7' => 5..
|
18
|
-
'8' => 5..
|
19
|
-
'9' => 6..
|
17
|
+
'7' => 5..8,
|
18
|
+
'8' => 5..8,
|
19
|
+
'9' => 6..8,
|
20
20
|
},
|
21
21
|
'Fedora' => {
|
22
22
|
'26' => [5],
|
@@ -27,26 +27,27 @@ module PuppetMetadata
|
|
27
27
|
'31' => 5..7,
|
28
28
|
'32' => 6..7,
|
29
29
|
'34' => 6..7,
|
30
|
+
'36' => 7-8,
|
30
31
|
},
|
31
32
|
'SLES' => {
|
32
33
|
'11' => [7],
|
33
|
-
'12' =>
|
34
|
-
'15' =>
|
34
|
+
'12' => 7..8,
|
35
|
+
'15' => 7..8,
|
35
36
|
},
|
36
37
|
# deb-based
|
37
38
|
'Debian' => {
|
38
39
|
'7' => [5],
|
39
40
|
'8' => 5..6,
|
40
41
|
'9' => 5..7,
|
41
|
-
'10' => 5..
|
42
|
-
'11' => 6..
|
42
|
+
'10' => 5..8,
|
43
|
+
'11' => 6..8,
|
43
44
|
},
|
44
45
|
'Ubuntu' => {
|
45
46
|
'14.04' => 5..6,
|
46
47
|
'16.04' => 5..7,
|
47
|
-
'18.04' => 5..
|
48
|
-
'20.04' => 6..
|
49
|
-
'22.04' => 6..
|
48
|
+
'18.04' => 5..8,
|
49
|
+
'20.04' => 6..8,
|
50
|
+
'22.04' => 6..8,
|
50
51
|
},
|
51
52
|
}.freeze
|
52
53
|
|
@@ -55,6 +56,7 @@ module PuppetMetadata
|
|
55
56
|
5 => '2.4',
|
56
57
|
6 => '2.5',
|
57
58
|
7 => '2.7',
|
59
|
+
8 => '3.2',
|
58
60
|
}.freeze
|
59
61
|
|
60
62
|
class << self
|
@@ -71,7 +71,7 @@ module PuppetMetadata
|
|
71
71
|
# Return whether a Beaker setfile can be generated for the given OS
|
72
72
|
# @param [String] os The operating system
|
73
73
|
def os_supported?(os)
|
74
|
-
['Archlinux', 'CentOS', 'Fedora', 'Debian', 'Ubuntu'].include?(os)
|
74
|
+
['Archlinux', 'CentOS', 'Fedora', 'Debian', 'Ubuntu', 'Rocky', 'AlmaLinux'].include?(os)
|
75
75
|
end
|
76
76
|
|
77
77
|
private
|
@@ -13,7 +13,6 @@ module PuppetMetadata
|
|
13
13
|
# @return [Hash[Symbol, Any]] The outputs for Github Actions
|
14
14
|
def outputs
|
15
15
|
{
|
16
|
-
beaker_setfiles: beaker_setfiles,
|
17
16
|
puppet_major_versions: puppet_major_versions,
|
18
17
|
puppet_unit_test_matrix: puppet_unit_test_matrix,
|
19
18
|
github_action_test_matrix: github_action_test_matrix,
|
@@ -22,18 +21,6 @@ module PuppetMetadata
|
|
22
21
|
|
23
22
|
private
|
24
23
|
|
25
|
-
|
26
|
-
def beaker_setfiles
|
27
|
-
setfiles = []
|
28
|
-
metadata.beaker_setfiles(use_fqdn: options[:beaker_use_fqdn], pidfile_workaround: options[:beaker_pidfile_workaround], domain: options[:domain]) do |setfile, name|
|
29
|
-
setfiles << {
|
30
|
-
name: name,
|
31
|
-
value: setfile,
|
32
|
-
}
|
33
|
-
end
|
34
|
-
setfiles
|
35
|
-
end
|
36
|
-
|
37
24
|
def puppet_major_versions
|
38
25
|
metadata.puppet_major_versions.sort.reverse.map do |version|
|
39
26
|
next if puppet_version_below_minimum?(version)
|
@@ -188,25 +188,6 @@ module PuppetMetadata
|
|
188
188
|
PuppetMetadata::GithubActions.new(self, options)
|
189
189
|
end
|
190
190
|
|
191
|
-
# @param [Boolean] use_fqdn
|
192
|
-
# Whether to set the hostname to a fully qualified domain name (deprecated, use domain)
|
193
|
-
# @param [Boolean] pidfile_workaround
|
194
|
-
# Whether to apply the Docker pidfile workaround
|
195
|
-
# @param [String] domain
|
196
|
-
# Enforce a domain to be appended to the hostname, making it an FQDN
|
197
|
-
# @yieldparam [String] setfile
|
198
|
-
# The supported setfile configurations
|
199
|
-
# @see PuppetMetadata::Beaker#os_release_to_setfile
|
200
|
-
def beaker_setfiles(use_fqdn: false, pidfile_workaround: false, domain: nil)
|
201
|
-
operatingsystems.each do |os, releases|
|
202
|
-
next unless PuppetMetadata::Beaker.os_supported?(os)
|
203
|
-
releases&.each do |release|
|
204
|
-
setfile = PuppetMetadata::Beaker.os_release_to_setfile(os, release, use_fqdn: use_fqdn, pidfile_workaround: pidfile_workaround, domain: domain)
|
205
|
-
yield setfile if setfile
|
206
|
-
end
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
191
|
private
|
211
192
|
|
212
193
|
def build_version_requirement_hash(array)
|
@@ -115,7 +115,7 @@ module PuppetMetadata
|
|
115
115
|
'19.10' => '2020-07-15',
|
116
116
|
'19.04' => '2020-01-15',
|
117
117
|
'18.10' => '2019-07-15',
|
118
|
-
'18.04' => '2023-
|
118
|
+
'18.04' => '2023-05-31',
|
119
119
|
'17.10' => '2018-07-15',
|
120
120
|
'17.04' => '2018-01-15',
|
121
121
|
'16.10' => '2017-07-20',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet_metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: metadata-json-lint
|
@@ -132,7 +132,7 @@ files:
|
|
132
132
|
- lib/puppet_metadata/github_actions.rb
|
133
133
|
- lib/puppet_metadata/metadata.rb
|
134
134
|
- lib/puppet_metadata/operatingsystem.rb
|
135
|
-
homepage:
|
135
|
+
homepage: https://github.com/voxpupuli/puppet_metadata
|
136
136
|
licenses:
|
137
137
|
- Apache-2.0
|
138
138
|
metadata: {}
|