simp-beaker-helpers 1.36.1 → 2.0.1
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/.github/workflows/add_new_issue_to_triage_project.yml +1 -1
- data/.github/workflows/pr_acceptance.yml +1 -1
- data/.github/workflows/pr_tests.yml +2 -2
- data/.github/workflows/tag_deploy_rubygem.yml +3 -3
- data/.gitignore +1 -0
- data/.gitlab-ci.yml +28 -37
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +2 -1
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +21 -11
- data/renovate.json +6 -0
- data/spec/acceptance/suites/default/fixture_modules_spec.rb +2 -1
- data/spec/lib/simp/beaker_helpers_spec.rb +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce5749e98e91120a7fe096123986044dadded4f84f2c2e7934c1d839078a17d
|
4
|
+
data.tar.gz: 1aebb5a748c01c77ee71f8dd042857bef2fde943f591b313bef04b9c69962927
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deb933f2d39a411b0c8543dc4aff0977f43e6e30b9c3b92c9061891fc6c544ee4dd44c89e64dfec198143ae4b7fe53ac0936a290da0bffbc99dc06c3eac3543a
|
7
|
+
data.tar.gz: 3ef97ba170ee15f8cdef7b11128feb77102ac55cfda46f963e42e60165866d406be3480cae0d926d21420f5955abd57896a4c22cbb042c602523578b083b4453
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
name: Add issue to project
|
16
16
|
runs-on: ubuntu-latest
|
17
17
|
steps:
|
18
|
-
- uses: actions/add-to-project@
|
18
|
+
- uses: actions/add-to-project@v1.0.2
|
19
19
|
with:
|
20
20
|
project-url: https://github.com/orgs/simp/projects/11
|
21
21
|
github-token: ${{ secrets.AUTO_TRIAGE_TOKEN }}
|
@@ -32,7 +32,7 @@ jobs:
|
|
32
32
|
runs-on: ubuntu-latest
|
33
33
|
continue-on-error: true
|
34
34
|
steps:
|
35
|
-
- uses: actions/checkout@
|
35
|
+
- uses: actions/checkout@v5
|
36
36
|
- name: "Install Ruby 2.7"
|
37
37
|
uses: ruby/setup-ruby@v1
|
38
38
|
with:
|
@@ -59,7 +59,7 @@ jobs:
|
|
59
59
|
env:
|
60
60
|
PUPPET_VERSION: ${{matrix.puppet.puppet_version}}
|
61
61
|
steps:
|
62
|
-
- uses: actions/checkout@
|
62
|
+
- uses: actions/checkout@v5
|
63
63
|
- name: 'Install Ruby ${{matrix.puppet.ruby_version}}'
|
64
64
|
uses: ruby/setup-ruby@v1
|
65
65
|
with:
|
@@ -63,7 +63,7 @@ jobs:
|
|
63
63
|
steps:
|
64
64
|
- name: "Assert '${{ github.ref }}' is a tag"
|
65
65
|
run: '[[ "$GITHUB_REF" =~ ^refs/tags/ ]] || { echo "::error ::GITHUB_REF is not a tag: ${GITHUB_REF}"; exit 1 ; }'
|
66
|
-
- uses: actions/checkout@
|
66
|
+
- uses: actions/checkout@v5
|
67
67
|
with:
|
68
68
|
ref: ${{ github.ref }}
|
69
69
|
clean: true
|
@@ -116,7 +116,7 @@ jobs:
|
|
116
116
|
tag: ${{ steps.tag-check.outputs.tag }}
|
117
117
|
steps:
|
118
118
|
- name: Checkout code
|
119
|
-
uses: actions/checkout@
|
119
|
+
uses: actions/checkout@v5
|
120
120
|
with:
|
121
121
|
ref: ${{ github.ref }}
|
122
122
|
clean: true
|
@@ -178,7 +178,7 @@ jobs:
|
|
178
178
|
PKG_DIR: ${{ needs.releng-checks.outputs.pkg_dir }}
|
179
179
|
steps:
|
180
180
|
- name: Checkout code
|
181
|
-
uses: actions/checkout@
|
181
|
+
uses: actions/checkout@v5
|
182
182
|
with:
|
183
183
|
ref: ${{ github.ref }}
|
184
184
|
clean: true
|
data/.gitignore
CHANGED
data/.gitlab-ci.yml
CHANGED
@@ -3,12 +3,10 @@
|
|
3
3
|
#
|
4
4
|
# https://puppet.com/docs/pe/2019.8/component_versions_in_recent_pe_releases.html
|
5
5
|
# https://puppet.com/misc/puppet-enterprise-lifecycle
|
6
|
-
# https://puppet.com/docs/pe/2018.1/overview/getting_support_for_pe.html
|
7
6
|
# ------------------------------------------------------------------------------
|
8
7
|
# Release Puppet Ruby EOL
|
9
|
-
#
|
10
|
-
# PE
|
11
|
-
# PE 2019.8 6.18 2.5.7 2022-12 (LTS)
|
8
|
+
# PE 2021.7 7.24 2.7.7 LTS EOS: 2024-08 EOL: 2025-02
|
9
|
+
# PE 2023.Y 7.24 2.7.7 Biannual updates
|
12
10
|
---
|
13
11
|
|
14
12
|
stages:
|
@@ -229,20 +227,6 @@ variables:
|
|
229
227
|
# Puppet Versions
|
230
228
|
#-----------------------------------------------------------------------
|
231
229
|
|
232
|
-
.pup_6_x: &pup_6_x
|
233
|
-
image: 'ruby:2.5'
|
234
|
-
variables:
|
235
|
-
PUPPET_VERSION: '~> 6.0'
|
236
|
-
BEAKER_PUPPET_COLLECTION: 'puppet6'
|
237
|
-
MATRIX_RUBY_VERSION: '2.5'
|
238
|
-
|
239
|
-
.pup_6_pe: &pup_6_pe
|
240
|
-
image: 'ruby:2.5'
|
241
|
-
variables:
|
242
|
-
PUPPET_VERSION: '6.22.1'
|
243
|
-
BEAKER_PUPPET_COLLECTION: 'puppet6'
|
244
|
-
MATRIX_RUBY_VERSION: '2.5'
|
245
|
-
|
246
230
|
.pup_7_x: &pup_7_x
|
247
231
|
image: 'ruby:2.7'
|
248
232
|
variables:
|
@@ -250,6 +234,14 @@ variables:
|
|
250
234
|
BEAKER_PUPPET_COLLECTION: 'puppet7'
|
251
235
|
MATRIX_RUBY_VERSION: '2.7'
|
252
236
|
|
237
|
+
.pup_8_x: &pup_8_x
|
238
|
+
image: 'ruby:3.2'
|
239
|
+
variables:
|
240
|
+
PUPPET_VERSION: '~> 8.0'
|
241
|
+
BEAKER_PUPPET_COLLECTION: 'puppet8'
|
242
|
+
MATRIX_RUBY_VERSION: '3.2'
|
243
|
+
|
244
|
+
|
253
245
|
# Testing Environments
|
254
246
|
#-----------------------------------------------------------------------
|
255
247
|
|
@@ -271,7 +263,7 @@ variables:
|
|
271
263
|
- 'bundle exec rake spec'
|
272
264
|
|
273
265
|
.beaker: &beaker
|
274
|
-
image: ruby:2.7.
|
266
|
+
image: ruby:2.7.8 # must be 2.7.2 if running in GCP
|
275
267
|
tags:
|
276
268
|
- beaker
|
277
269
|
before_script:
|
@@ -296,14 +288,13 @@ variables:
|
|
296
288
|
# Unit Tests
|
297
289
|
#-----------------------------------------------------------------------
|
298
290
|
|
299
|
-
pup6.x-unit:
|
300
|
-
<<: *pup_6_x
|
301
|
-
<<: *unit_tests
|
302
|
-
|
303
291
|
pup7.x-unit:
|
304
292
|
<<: *pup_7_x
|
305
293
|
<<: *unit_tests
|
306
294
|
|
295
|
+
pup8.x-unit:
|
296
|
+
<<: *pup_8_x
|
297
|
+
<<: *unit_tests
|
307
298
|
|
308
299
|
# Repo-specific content
|
309
300
|
# ==============================================================================
|
@@ -311,14 +302,14 @@ pup7.x-unit:
|
|
311
302
|
#=======================================================================
|
312
303
|
# Packaging test
|
313
304
|
|
314
|
-
|
315
|
-
<<: *
|
305
|
+
pup7.x-pkg:
|
306
|
+
<<: *pup_7_x
|
316
307
|
<<: *unit_tests
|
317
308
|
script:
|
318
309
|
'bundle exec rake pkg:gem'
|
319
310
|
|
320
|
-
|
321
|
-
<<: *
|
311
|
+
pup8.x-pkg:
|
312
|
+
<<: *pup_8_x
|
322
313
|
<<: *unit_tests
|
323
314
|
script:
|
324
315
|
'bundle exec rake pkg:gem'
|
@@ -331,38 +322,38 @@ pup7.x-pkg:
|
|
331
322
|
# and the bundle is configured with this version of simp-beaker-helpers)
|
332
323
|
# than in an acceptance test with a build user.
|
333
324
|
default-bad-nodeset:
|
334
|
-
<<: *
|
325
|
+
<<: *pup_8_x
|
335
326
|
<<: *acceptance_base
|
336
327
|
script:
|
337
328
|
- 'RESULT=`bundle exec rake beaker:suites[default,oops] 1>/dev/null; echo $?`; (test $RESULT == "1")'
|
338
329
|
- echo 'beaker:suites correctly failed with unknown nodeset'
|
339
330
|
|
340
331
|
default:
|
341
|
-
<<: *
|
332
|
+
<<: *pup_8_x
|
342
333
|
<<: *acceptance_base
|
343
334
|
script:
|
344
335
|
- bundle exec rake beaker:suites[default]
|
345
336
|
|
346
337
|
default-amzn2:
|
347
|
-
<<: *
|
338
|
+
<<: *pup_8_x
|
348
339
|
<<: *acceptance_base
|
349
340
|
script:
|
350
341
|
- bundle exec rake beaker:suites[default,amzn2]
|
351
342
|
|
352
343
|
default-fips:
|
353
|
-
<<: *
|
344
|
+
<<: *pup_8_x
|
354
345
|
<<: *acceptance_base
|
355
346
|
script:
|
356
347
|
- BEAKER_fips=yes bundle exec rake beaker:suites[default]
|
357
348
|
|
358
349
|
fips_from_fixtures:
|
359
|
-
<<: *
|
350
|
+
<<: *pup_8_x
|
360
351
|
<<: *acceptance_base
|
361
352
|
script:
|
362
353
|
- bundle exec rake beaker:suites[fips_from_fixtures]
|
363
354
|
|
364
|
-
|
365
|
-
<<: *
|
355
|
+
puppet8_collections:
|
356
|
+
<<: *pup_8_x
|
366
357
|
<<: *acceptance_base
|
367
358
|
script:
|
368
359
|
- bundle exec rake beaker:suites[puppet_collections]
|
@@ -374,20 +365,20 @@ puppet7_collections:
|
|
374
365
|
- bundle exec rake beaker:suites[puppet_collections]
|
375
366
|
|
376
367
|
oel_ssg:
|
377
|
-
<<: *
|
368
|
+
<<: *pup_8_x
|
378
369
|
<<: *acceptance_base
|
379
370
|
script:
|
380
371
|
- bundle exec rake beaker:suites[ssg,oel]
|
381
372
|
|
382
373
|
windows:
|
383
|
-
<<: *
|
374
|
+
<<: *pup_8_x
|
384
375
|
<<: *acceptance_base
|
385
376
|
allow_failure: true
|
386
377
|
script:
|
387
378
|
- bundle exec rake beaker:suites[windows]
|
388
379
|
|
389
380
|
snapshot:
|
390
|
-
<<: *
|
381
|
+
<<: *pup_8_x
|
391
382
|
<<: *acceptance_base
|
392
383
|
# This is prone to breakage in the underlying system
|
393
384
|
allow_failure: true
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### 2.0.1 / 2025-08-28
|
2
|
+
* Fixed:
|
3
|
+
* Rename `fips_enabled` method to `fips_enabled?`
|
4
|
+
to correct a rubocop complaint
|
5
|
+
|
6
|
+
### 2.0.0 / 2025-08-12
|
7
|
+
* Added
|
8
|
+
* Openvox support (re-publishing 1.36.0 as a breaking change)
|
9
|
+
|
1
10
|
### 1.36.1 / 2025-08-12
|
2
11
|
* Fixed:
|
3
12
|
* Reverted breaking change (#236)
|
data/Gemfile
CHANGED
@@ -37,13 +37,14 @@ group :system_tests do
|
|
37
37
|
|
38
38
|
gem 'bcrypt_pbkdf'
|
39
39
|
gem 'beaker-rspec'
|
40
|
+
gem 'beaker_puppet_helpers'
|
40
41
|
gem 'beaker-windows'
|
41
42
|
gem 'ed25519'
|
42
43
|
gem 'net-ssh'
|
43
44
|
gem 'pry-byebug', '~> 3.10.0'
|
44
45
|
gem 'puppet', ENV.fetch('PUPPET_VERSION', ['>= 7.0.0', '< 9.0.0'])
|
45
46
|
gem 'puppetlabs_spec_helper', '>= 4.0.0', '< 8.0.0'
|
46
|
-
gem 'rubocop', '~> 1.
|
47
|
+
gem 'rubocop', '~> 1.80.0'
|
47
48
|
gem 'rubocop-performance', '~> 1.23.0'
|
48
49
|
gem 'rubocop-rake', '~> 0.6.0'
|
49
50
|
gem 'rubocop-rspec', '~> 3.3.0'
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -114,12 +114,14 @@ module Simp::BeakerHelpers
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# We can't cache this because it may change during a run
|
117
|
-
def fips_enabled(sut)
|
117
|
+
def fips_enabled?(sut)
|
118
118
|
on(sut,
|
119
119
|
'cat /proc/sys/crypto/fips_enabled 2>/dev/null',
|
120
120
|
accept_all_exit_codes: true).output.strip == '1'
|
121
121
|
end
|
122
122
|
|
123
|
+
alias fips_enabled fips_enabled?
|
124
|
+
|
123
125
|
def rsync_functional_on?(sut)
|
124
126
|
# We have to check if rsync *still* works otherwise
|
125
127
|
return false if @rsync_functional == false
|
@@ -764,7 +766,7 @@ module Simp::BeakerHelpers
|
|
764
766
|
u.strip!
|
765
767
|
u = u.split(':')
|
766
768
|
%r{^(/|/dev/.*|/s?bin/?.*|/proc/?.*)$}.match?(u[5]) ? [nil] : [u[0], u[5]]
|
767
|
-
end
|
769
|
+
end,
|
768
770
|
]
|
769
771
|
|
770
772
|
user_info.each_key do |user|
|
@@ -1393,7 +1395,7 @@ module Simp::BeakerHelpers
|
|
1393
1395
|
#
|
1394
1396
|
# @return [String,Nil] the `puppet-agent` version or nil
|
1395
1397
|
#
|
1396
|
-
def latest_puppet_agent_version_for(puppet_version)
|
1398
|
+
def latest_puppet_agent_version_for(puppet_version, puppet_collection_name = 'puppet')
|
1397
1399
|
return nil if puppet_version.nil?
|
1398
1400
|
|
1399
1401
|
require 'rubygems/requirement'
|
@@ -1418,7 +1420,7 @@ module Simp::BeakerHelpers
|
|
1418
1420
|
puppet_gems = nil
|
1419
1421
|
|
1420
1422
|
Bundler.with_unbundled_env do
|
1421
|
-
puppet_gems = `gem search -ra -e
|
1423
|
+
puppet_gems = `gem search -ra -e #{puppet_collection_name}`.match(%r{\((.+)\)})
|
1422
1424
|
end
|
1423
1425
|
|
1424
1426
|
if puppet_gems
|
@@ -1467,10 +1469,10 @@ module Simp::BeakerHelpers
|
|
1467
1469
|
|
1468
1470
|
if puppet_agent_version.nil?
|
1469
1471
|
if (puppet_collection = ENV['BEAKER_PUPPET_COLLECTION'] || host.options['puppet_collection'])
|
1470
|
-
raise("Error: Puppet Collection '#{puppet_collection}' must match /puppet(\\d+)/") unless puppet_collection =~ %r{puppet(\d+)}
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1472
|
+
raise("Error: Puppet Collection '#{puppet_collection}' must match /(puppet|openvox)(\\d+)/") unless puppet_collection =~ %r{(puppet|openvox)(\d+)}
|
1473
|
+
puppet_collection_name = ::Regexp.last_match(1)
|
1474
|
+
puppet_install_version = "~> #{::Regexp.last_match(2)}"
|
1475
|
+
puppet_agent_version = latest_puppet_agent_version_for(puppet_install_version, puppet_collection_name)
|
1474
1476
|
else
|
1475
1477
|
puppet_agent_version = latest_puppet_agent_version_for(DEFAULT_PUPPET_AGENT_VERSION)
|
1476
1478
|
end
|
@@ -1488,19 +1490,27 @@ module Simp::BeakerHelpers
|
|
1488
1490
|
}
|
1489
1491
|
end
|
1490
1492
|
|
1493
|
+
def run_puppet_install_helper_on(hosts)
|
1494
|
+
block_on hosts, run_in_parallel: true do |host|
|
1495
|
+
BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, ENV['BEAKER_PUPPET_COLLECTION'])
|
1496
|
+
package_name = ENV.fetch('BEAKER_PUPPET_PACKAGE_NAME', BeakerPuppetHelpers::InstallUtils.collection2packagename(host, ENV['BEAKER_PUPPET_COLLECTION']))
|
1497
|
+
host.install_package(package_name)
|
1498
|
+
end
|
1499
|
+
end
|
1500
|
+
|
1491
1501
|
# Replacement for `install_puppet` in spec_helper_acceptance.rb
|
1492
1502
|
def install_puppet
|
1493
1503
|
install_info = get_puppet_install_info
|
1494
1504
|
|
1495
1505
|
# In case Beaker needs this info internally
|
1496
|
-
ENV['PUPPET_INSTALL_VERSION'] = install_info[:puppet_install_version]
|
1497
1506
|
if install_info[:puppet_collection]
|
1498
1507
|
ENV['BEAKER_PUPPET_COLLECTION'] = install_info[:puppet_collection]
|
1499
1508
|
end
|
1500
1509
|
|
1501
|
-
require '
|
1502
|
-
|
1510
|
+
require 'beaker_puppet_helpers'
|
1511
|
+
run_puppet_install_helper_on(hosts)
|
1503
1512
|
end
|
1513
|
+
alias install_openvox install_puppet
|
1504
1514
|
|
1505
1515
|
# Configure all SIMP repos on a host and disable all repos in the disable Array
|
1506
1516
|
#
|
data/renovate.json
ADDED
@@ -8,7 +8,8 @@ context 'after copy_fixture_modules_to( hosts )' do
|
|
8
8
|
|
9
9
|
describe "fact_on(default,'root_home')" do
|
10
10
|
it 'does not return value of `root_home`' do
|
11
|
-
|
11
|
+
pending 'Conflicts with beaker_puppet_helpers' unless Gem::Version.new(pfact_on(default, 'puppetversion').to_s) < Gem::Version.new('8')
|
12
|
+
expect(Beaker::DSL::Helpers::FacterHelpers.fact_on(default, 'root_home').to_s).to eq ''
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -64,6 +64,11 @@ describe 'Simp::BeakerHelpers' do
|
|
64
64
|
].join(', ')})\n"
|
65
65
|
end
|
66
66
|
|
67
|
+
let(:openvox_gem_search_results) do
|
68
|
+
# subset of results, but still exercises code
|
69
|
+
"openvox (8.19.2, 8.19.1, 8.19.0, 7.37.2, 7.37.1)\n"
|
70
|
+
end
|
71
|
+
|
67
72
|
context '#latest_puppet_agent_version_for' do
|
68
73
|
context 'using table' do
|
69
74
|
it 'maps exact Puppet version' do
|
@@ -206,6 +211,17 @@ describe 'Simp::BeakerHelpers' do
|
|
206
211
|
expect(helper.get_puppet_install_info).to eq expected
|
207
212
|
end
|
208
213
|
|
214
|
+
it 'extracts openvox info from BEAKER_PUPPET_COLLECTION' do
|
215
|
+
allow(helper).to receive(:`).with('gem search -ra -e openvox').and_return(openvox_gem_search_results)
|
216
|
+
helper.host.options = { 'puppet_collection' => 'openvox8' }
|
217
|
+
expected = {
|
218
|
+
puppet_install_version: '8.19.2',
|
219
|
+
puppet_collection: 'openvox8',
|
220
|
+
puppet_install_type: 'agent'
|
221
|
+
}
|
222
|
+
expect(helper.get_puppet_install_info).to eq expected
|
223
|
+
end
|
224
|
+
|
209
225
|
it 'extracts info from PUPPET_INSTALL_TYPE' do
|
210
226
|
ENV['PUPPET_INSTALL_TYPE'] = 'pe'
|
211
227
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
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: 2025-08-
|
12
|
+
date: 2025-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/simp/beaker_helpers/version.rb
|
197
197
|
- lib/simp/beaker_helpers/windows.rb
|
198
198
|
- lib/simp/rake/beaker.rb
|
199
|
+
- renovate.json
|
199
200
|
- simp-beaker-helpers.gemspec
|
200
201
|
- spec/acceptance/nodesets/amzn2.yml
|
201
202
|
- spec/acceptance/nodesets/default.yml
|