simp-rake-helpers 5.19.2 → 5.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ac10a3909fa53721a58abc43425a87b19e05f39c708b708c72f05156daab6f8
4
- data.tar.gz: 149664e7aedb68668912e8541ac7b664d0041f7ebcb5e0b423d370588295fde2
3
+ metadata.gz: 321387edbe99a15f34c2826cd1c822582f3f7654dd1a4acbd2e96ef0a133215d
4
+ data.tar.gz: 541e7eb0edca9975c7a0bf8c0b33895413f9fde8b0a400274d0cd41ea5551cee
5
5
  SHA512:
6
- metadata.gz: 918d9a55db0c5f9b6b7dd4128a19ddbb8a94f63b923da0c57f9193954cee9380cc0844ac0f9a8e459f0f95b83b7d2339b97808c0aae39461ef332d4a6b0300f9
7
- data.tar.gz: 27f663a9423e24ac41009ffe539be6c450c8c6ab00326bc8d6217cb2060d3c4ac136ec3a78df60a66a3885696e17d151fdb2d15c3132026931ab7530255c0700
6
+ metadata.gz: 4132a9ac29c5f264162551a8dfcef44bed5a287cca8f5fb18361b020c780b63ed0748a150bc0e2acab9f7384765656f281de553b5b205ca5ad553c5da4db3f7d
7
+ data.tar.gz: a753b2d3d99eeab967aab912da8448a75ccd025376f6ac5d4e379d19821a79090031236fdf67d819827238903c86e2ffed498f1fcd19627fd89e38eb82fbe56e
data/CHANGELOG.md CHANGED
@@ -1,16 +1,37 @@
1
- ### 5.19.2 /2023-05-09
1
+ ### 5.21.0 / 2023-08-24
2
+ - Fixed
3
+ - Support for Ruby 3 and Puppet 8
4
+ - Update gem dependencies
5
+
6
+ ### 5.20.0 /2023-07-03
7
+ - Added
8
+ - Support for `puppetlabs-spec-helper` 6.x and `puppet-lint`
9
+ - New gem dependencies:
10
+ - `metadata-json-lint`
11
+ - `puppet-lint-params_empty_string-check`
12
+ - Acceptance test/nodeset support for Puppet 8
13
+ - Modernized GHA PR test matrix
14
+ - Changed
15
+ - Default Puppet = 7.x
16
+ - Default Ruby = 2.7
17
+ - Fixed
18
+ - Don't fail when `metadata` task is not present
19
+ - Untangled non-standard GHA workflows
20
+ - Release workflow bug
21
+
22
+ ### 5.19.1 / 2023-05-15
2
23
  - Fixed
3
24
  - Bumped required puppet version to < 9.0
4
25
  - The base repo for the el7 ISO was unusable because the repodata for it
5
26
  was being excluded on the unpack of the distribution ISO; In the case
6
27
  of building an el7 iso, we now ensure the repodata directory exists.
7
28
 
8
- ### 5.19.1 /2023-03-27
29
+ ### 5.19.1 / 2023-03-27
9
30
  - Added
10
31
  - Allow `SIMP_BUILD_PKG_require_rebuild` to be case-insensitive to
11
32
  accommodate GHA
12
33
 
13
- ### 5.19.0 /2023-03-20
34
+ ### 5.19.0 / 2023-03-20
14
35
  - Added
15
36
  - `pkg:single` will skip the `require_rebuild?` logic
16
37
  when `SIMP_BUILD_PKG_require_rebuild=yes`
@@ -19,7 +40,7 @@
19
40
  now use `SIMP_BUILD_PKG_require_rebuild=yes`
20
41
 
21
42
 
22
- ### 5.18.0 /2023-02-27
43
+ ### 5.18.0 / 2023-02-27
23
44
  - Added
24
45
  - `SIMP_BUILD_reposync_only` now excludes RPMs and yum repos from the ISO
25
46
  `unpack` task
@@ -28,12 +49,12 @@
28
49
  - EL7 ISO unpack no longer interferes with reposync repos when
29
50
  `SIMP_BUILD_reposync_only=yes`
30
51
 
31
- ### 5.17.1 /2022-11-11
52
+ ### 5.17.1 / 2022-11-11
32
53
  - Fixed
33
54
  - Fixed an edge case where the `SIMP` directory YUM metadata was not
34
55
  present if you used `reposync` for everything but the `SIMP` directory
35
56
 
36
- ### 5.17.0 /2022-10-30
57
+ ### 5.17.0 / 2022-10-30
37
58
  - Added
38
59
  - The RPM dependency file can now use `ignores` to remove items instead of
39
60
  needing to redefine the entire dependency stack to remove deps
@@ -179,7 +200,7 @@
179
200
  pkg:check_published. Attempt as many checks as possible and then
180
201
  report all failures.
181
202
 
182
- ### 5.10.0 /2019-08-30
203
+ ### 5.10.0 / 2019-08-30
183
204
  * Add initial linting tasks for CI configuration (simp:ci_lint and
184
205
  simp:gitlab_ci_lint). The only checks currently being done are
185
206
  as follows:
@@ -189,7 +210,7 @@
189
210
  specifies the suite and nodeset to be used and that the specified
190
211
  suite and nodeset exist.
191
212
 
192
- ### 5.9.1 /2019-08-06
213
+ ### 5.9.1 / 2019-08-06
193
214
  Fixed 2 bugs in the SIMP Puppet module generated RPM spec files
194
215
  * When SIMP Puppet module RPMs were installed, they created the wrong
195
216
  state directory, '/%{_localstatedir}/lib/rpm-state/simp-adapter'.
data/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # SIMP_GEM_SERVERS | a space/comma delimited list of rubygem servers
4
4
  # PUPPET_VERSION | specifies the version of the puppet gem to load
5
- puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : '~> 7'
5
+ puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 7.0.0', '< 9.0.0']
6
6
  gem_sources = ENV.key?('SIMP_GEM_SERVERS') ? ENV['SIMP_GEM_SERVERS'].split(/[, ]+/) : ['https://rubygems.org']
7
7
 
8
8
  gem_sources.each { |gem_source| source gem_source }
@@ -80,7 +80,7 @@ class Simp::Ci::Gitlab
80
80
  return @gitlab_yaml if @gitlab_yaml
81
81
 
82
82
  begin
83
- @gitlab_yaml = YAML.load_file(@gitlab_config_file)
83
+ @gitlab_yaml = YAML.safe_load(File.read(@gitlab_config_file), filename: @gitlab_config_file, aliases: true)
84
84
  rescue Psych::SyntaxError => e
85
85
  msg = "ERROR: Malformed YAML: #{e.message}"
86
86
  raise LintError.new(msg)
@@ -85,7 +85,7 @@ class Simp::ComponentInfo
85
85
  def initialize(component_dir, latest_version_only = false, verbose = true)
86
86
  @component_dir = component_dir
87
87
 
88
- if File.exists?(File.join(@component_dir, 'metadata.json'))
88
+ if File.exist?(File.join(@component_dir, 'metadata.json'))
89
89
  @type = :module
90
90
  load_module_info(latest_version_only, verbose)
91
91
  else
@@ -107,7 +107,7 @@ class Simp::ComponentInfo
107
107
 
108
108
 
109
109
  changelog_file = File.join(component_dir, 'CHANGELOG')
110
- unless File.exists?(changelog_file)
110
+ unless File.exist?(changelog_file)
111
111
  fail("ERROR: No CHANGELOG file found in #{component_dir}")
112
112
  end
113
113
  @changelog = parse_changelog(IO.read(changelog_file), latest_version_only, verbose)
@@ -241,7 +241,7 @@ module Simp::Rake::Build
241
241
  fail SIMPBuildException, "ERROR: Mixing `SIMP_BUILD_rm_staging_dir=yes` and `SIMP_BUILD_unpack=no` is silly."
242
242
  end
243
243
 
244
- if File.exists?(output_dir) && !File.directory?(output_dir)
244
+ if File.exist?(output_dir) && !File.directory?(output_dir)
245
245
  fail SIMPBuildException, "ERROR: ISO output dir exists but is not a directory:\n\n" +
246
246
  " '#{output_dir}'\n\n"
247
247
  end
@@ -521,7 +521,7 @@ module Simp::Rake::Build
521
521
  puts '-'*80
522
522
 
523
523
  FileUtils.rm_rf staging_dir, :verbose => verbose
524
- elsif File.exists? staging_dir
524
+ elsif File.exist? staging_dir
525
525
  warn ''
526
526
  warn '!'*80
527
527
  warn '#### WARNING: staging dir already exists at:'
@@ -64,7 +64,7 @@ module Simp::Rake::Build
64
64
 
65
65
  fail("Could not find directory #{mod}") unless Dir.exist?(mod)
66
66
 
67
- next unless File.exists?(File.join(mod,'Gemfile'))
67
+ next unless File.exist?(File.join(mod,'Gemfile'))
68
68
  puts "\n#{mod}\n" if verbose
69
69
  Dir.chdir(mod) do
70
70
  if File.exist?('Gemfile.lock')
@@ -515,7 +515,7 @@ module Simp::Rake::Build
515
515
 
516
516
  # Create example packages.yaml
517
517
  packages_yaml_path = File.join(target_dir, 'packages.yaml')
518
- unless File.exists? packages_yaml_path
518
+ unless File.exist? packages_yaml_path
519
519
  pkg = 'example-package-name'
520
520
  pkg_file = "#{pkg}-1.0.0-1.el#{major_os_ver}.#{args[:arch]}.rpm"
521
521
  yum_url = "https://yum.server/#{args[:os]}/#{major_os_ver}/#{args[:arch]}"
@@ -183,12 +183,12 @@ module Simp::Rake::Build
183
183
  end
184
184
 
185
185
  rpm_build_keys.each do |gpgkey|
186
- cp(gpgkey, dvd_dir, :verbose => @verbose)
186
+ FileUtils.cp(gpgkey, dvd_dir, :verbose => @verbose)
187
187
  end
188
188
  # Otherwise, make sure it isn't present for the build
189
189
  else
190
190
  Dir[File.join(dvd_dir,'RPM-GPG-KEY-SIMP*')].each do |to_del|
191
- rm(to_del)
191
+ FileUtils.rm(to_del)
192
192
  end
193
193
  end
194
194
  end
@@ -602,7 +602,7 @@ module Simp::Rake::Build
602
602
  .delete_if{|x| x =~ /\.src\.rpm$/}
603
603
  .each do |path|
604
604
  sym_path = "repos/basetest/#{File.basename(path)}"
605
- ln_sf(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
605
+ ln_sf(path,sym_path, :verbose => @verbose) unless File.exist?(sym_path)
606
606
  end
607
607
 
608
608
  if args[:aux_dir]
@@ -610,7 +610,7 @@ module Simp::Rake::Build
610
610
  .delete_if{|x| x =~ /\.src\.rpm$/}
611
611
  .each do |path|
612
612
  sym_path = "repos/lookaside/#{File.basename(path)}"
613
- ln_sf(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
613
+ ln_sf(path,sym_path, :verbose => @verbose) unless File.exist?(sym_path)
614
614
  end
615
615
  end
616
616
 
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.19.2'
5
+ VERSION = '5.21.0'
6
6
  end
@@ -100,14 +100,14 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
100
100
  end
101
101
 
102
102
  desc 'lint metadata.json'
103
- Rake::Task[:metadata].clear
103
+ Rake::Task[:metadata].clear if Rake::Task.tasks.any?{ |x| x.name == 'metadata' }
104
104
  task :metadata => :metadata_lint
105
105
 
106
106
  # Read the metadata.json as a data structure
107
107
  def metadata( file_path = nil )
108
108
  require 'json'
109
109
  _file = file_path || File.join(@base_dir, 'metadata.json')
110
- fail "ERROR: file not found: '#{_file}'" unless File.exists? _file
110
+ fail "ERROR: file not found: '#{_file}'" unless File.exist? _file
111
111
  @metadata ||= JSON.parse( File.read(_file) )
112
112
  end
113
113
 
@@ -1,3 +1,4 @@
1
+ ---
1
2
  HOSTS:
2
3
  el7-build-server:
3
4
  roles:
@@ -6,7 +7,7 @@ HOSTS:
6
7
  platform: el-7-x86_64
7
8
  hypervisor: docker
8
9
  image: simpproject/simp_build_centos7
9
- docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log'
10
+ docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
10
11
 
11
12
  el8-build-server:
12
13
  roles:
@@ -19,12 +20,8 @@ HOSTS:
19
20
 
20
21
  CONFIG:
21
22
  log_level: verbose
22
- type: aio
23
- <% if ENV['BEAKER_PUPPET_COLLECTION'] -%>
24
- puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %>
25
- <% else -%>
26
- puppet_collection: puppet6
27
- <% end -%>
23
+ type: aio
24
+ puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>"
28
25
  ssh:
29
26
  password: root
30
27
  auth_methods:
@@ -0,0 +1,33 @@
1
+ ---
2
+ HOSTS:
3
+ el7-build-server:
4
+ roles:
5
+ - default
6
+ - build_server
7
+ platform: el-7-x86_64
8
+ hypervisor: docker
9
+ image: simpproject/simp_build_centos7_ruby3_1
10
+ docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
11
+
12
+ el8-build-server:
13
+ roles:
14
+ - build_server
15
+ platform: el-8-x86_64
16
+ hypervisor: docker
17
+ image: simpproject/simp_build_centos8_ruby3_1
18
+ docker_cmd: '["/sbin/init"]'
19
+ docker_preserve_image: true
20
+
21
+ CONFIG:
22
+ log_level: verbose
23
+ type: aio
24
+ puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>"
25
+ ssh:
26
+ password: root
27
+ auth_methods:
28
+ - password
29
+ docker_preserve_image: true
30
+ mount_folders:
31
+ host_files:
32
+ host_path: ./
33
+ container_path: /host_files
@@ -135,8 +135,7 @@ describe 'rake pkg:signrpms and pkg:checksig' do
135
135
  it 'creates GPG dev signing key and signs packages' do
136
136
  hosts.each do |host|
137
137
  # NOTE: pkg:signrpms will not actually fail if it can't sign a RPM
138
- on(hosts, %(#{run_cmd} "cd '#{test_dir}'; #{signrpm_cmd}"), run_opts)
139
-
138
+ on(hosts, %(#{run_cmd} "cd '#{test_dir}'; SIMP_PKG_verbose=yes #{signrpm_cmd}"), run_opts)
140
139
  expect(file_exists_on(host,"#{dirs[host][:dvd_dir]}/RPM-GPG-KEY-SIMP-Dev")).to be true
141
140
 
142
141
  result = on(host, "rpm -qip '#{test_rpm}' | grep ^Signature", run_opts)
@@ -48,7 +48,7 @@ module Simp::BeakerHelpers::SimpRakeHelpers::BuildProjectHelpers
48
48
  maj_rel = facts['operatingsystemmajrelease'] ||
49
49
  facts.fetch('os', {}).fetch('release', {})['major'] ||
50
50
  facts['operatingsystemrelease'].split('.').first
51
- architecture = facts['architecture']
51
+ architecture = facts['architecture'] || facts.dig('os','architecture')
52
52
 
53
53
  dir = "#{proj_dir}/build/distributions/#{name}/#{maj_rel}/#{architecture}"
54
54
  @distribution_dirs[host.to_s] = dir
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.19.2
4
+ version: 5.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-09 00:00:00.000000000 Z
12
+ date: 2023-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simp-beaker-helpers
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '10.0'
55
55
  - - "<"
56
56
  - !ruby/object:Gem::Version
57
- version: '13.0'
57
+ version: '14.0'
58
58
  type: :runtime
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
@@ -64,7 +64,7 @@ dependencies:
64
64
  version: '10.0'
65
65
  - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '13.0'
67
+ version: '14.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: puppet
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -87,6 +87,26 @@ dependencies:
87
87
  version: '9.0'
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: puppet-lint
90
+ requirement: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '1.0'
95
+ - - "<"
96
+ - !ruby/object:Gem::Version
97
+ version: '5.0'
98
+ type: :runtime
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '1.0'
105
+ - - "<"
106
+ - !ruby/object:Gem::Version
107
+ version: '5.0'
108
+ - !ruby/object:Gem::Dependency
109
+ name: puppet-lint-optional_default-check
90
110
  requirement: !ruby/object:Gem::Requirement
91
111
  requirements:
92
112
  - - ">="
@@ -106,7 +126,7 @@ dependencies:
106
126
  - !ruby/object:Gem::Version
107
127
  version: '3.0'
108
128
  - !ruby/object:Gem::Dependency
109
- name: puppet-lint-optional_default-check
129
+ name: puppet-lint-params_empty_string-check
110
130
  requirement: !ruby/object:Gem::Requirement
111
131
  requirements:
112
132
  - - ">="
@@ -114,7 +134,7 @@ dependencies:
114
134
  version: '1.0'
115
135
  - - "<"
116
136
  - !ruby/object:Gem::Version
117
- version: '2.0'
137
+ version: '3.0'
118
138
  type: :runtime
119
139
  prerelease: false
120
140
  version_requirements: !ruby/object:Gem::Requirement
@@ -124,19 +144,39 @@ dependencies:
124
144
  version: '1.0'
125
145
  - - "<"
126
146
  - !ruby/object:Gem::Version
127
- version: '2.0'
147
+ version: '3.0'
128
148
  - !ruby/object:Gem::Dependency
129
149
  name: puppetlabs_spec_helper
130
150
  requirement: !ruby/object:Gem::Requirement
131
151
  requirements:
132
152
  - - "~>"
133
153
  - !ruby/object:Gem::Version
134
- version: '4.0'
154
+ version: '6.0'
135
155
  type: :runtime
136
156
  prerelease: false
137
157
  version_requirements: !ruby/object:Gem::Requirement
138
158
  requirements:
139
159
  - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: '6.0'
162
+ - !ruby/object:Gem::Dependency
163
+ name: metadata-json-lint
164
+ requirement: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '1.2'
169
+ - - "<"
170
+ - !ruby/object:Gem::Version
171
+ version: '4.0'
172
+ type: :runtime
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '1.2'
179
+ - - "<"
140
180
  - !ruby/object:Gem::Version
141
181
  version: '4.0'
142
182
  - !ruby/object:Gem::Dependency
@@ -177,16 +217,22 @@ dependencies:
177
217
  name: puppet-blacksmith
178
218
  requirement: !ruby/object:Gem::Requirement
179
219
  requirements:
180
- - - "~>"
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: 3.3.0
223
+ - - "<"
181
224
  - !ruby/object:Gem::Version
182
- version: '3.3'
225
+ version: '8.0'
183
226
  type: :runtime
184
227
  prerelease: false
185
228
  version_requirements: !ruby/object:Gem::Requirement
186
229
  requirements:
187
- - - "~>"
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: 3.3.0
233
+ - - "<"
188
234
  - !ruby/object:Gem::Version
189
- version: '3.3'
235
+ version: '8.0'
190
236
  - !ruby/object:Gem::Dependency
191
237
  name: parallel_tests
192
238
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +242,7 @@ dependencies:
196
242
  version: '2.4'
197
243
  - - "<"
198
244
  - !ruby/object:Gem::Version
199
- version: '2.25'
245
+ version: '5.0'
200
246
  type: :runtime
201
247
  prerelease: false
202
248
  version_requirements: !ruby/object:Gem::Requirement
@@ -206,7 +252,7 @@ dependencies:
206
252
  version: '2.4'
207
253
  - - "<"
208
254
  - !ruby/object:Gem::Version
209
- version: '2.25'
255
+ version: '5.0'
210
256
  - !ruby/object:Gem::Dependency
211
257
  name: r10k
212
258
  requirement: !ruby/object:Gem::Requirement
@@ -216,7 +262,7 @@ dependencies:
216
262
  version: '2.2'
217
263
  - - "<"
218
264
  - !ruby/object:Gem::Version
219
- version: '4.0'
265
+ version: '5.0'
220
266
  type: :runtime
221
267
  prerelease: false
222
268
  version_requirements: !ruby/object:Gem::Requirement
@@ -226,7 +272,7 @@ dependencies:
226
272
  version: '2.2'
227
273
  - - "<"
228
274
  - !ruby/object:Gem::Version
229
- version: '4.0'
275
+ version: '5.0'
230
276
  - !ruby/object:Gem::Dependency
231
277
  name: pager
232
278
  requirement: !ruby/object:Gem::Requirement
@@ -337,6 +383,7 @@ files:
337
383
  - lib/simp/rpm_signer.rb
338
384
  - lib/simp/yum.rb
339
385
  - spec/acceptance/nodesets/default.yml
386
+ - spec/acceptance/nodesets/default_ruby3_1.yml
340
387
  - spec/acceptance/suites/default/00_pkg_rpm_custom_scriptlets_spec.rb
341
388
  - spec/acceptance/suites/default/10_pkg_rpm_spec.rb
342
389
  - spec/acceptance/suites/default/30_pkg_misc_spec.rb
@@ -596,7 +643,7 @@ homepage: https://github.com/simp/rubygem-simp-rake-helpers
596
643
  licenses:
597
644
  - Apache-2.0
598
645
  metadata:
599
- issue_tracker: https://simp-project.atlassian.net
646
+ issue_tracker: https://github.com/simp/rubygem-simp-rake-helpers/issues
600
647
  post_install_message:
601
648
  rdoc_options: []
602
649
  require_paths: