beaker-puppet 3.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +25 -0
- data/beaker-puppet.gemspec +1 -1
- data/lib/beaker-puppet/install_utils/foss_utils.rb +18 -38
- data/lib/beaker-puppet/install_utils/puppet5.rb +6 -1
- data/lib/beaker-puppet/version.rb +1 -1
- data/spec/beaker-puppet/install_utils/foss_utils_spec.rb +6 -46
- data/spec/beaker-puppet/install_utils/puppet5_spec.rb +18 -1
- data/spec/helpers.rb +1 -3
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8afbe94a259d88e99964c542bc6e9c321c073969c05d9ab34b55540ca077118
|
4
|
+
data.tar.gz: 7d257b9d096051e9dec2566172352791eecb410b476003d1d21147185a4bd698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a57b72b62904a6b4bd9042e8d3befd6fe8f2e6edbcf55ca1aacf26969fe8abc3bfedf836a38e02fdd0176d36e64afd85b3a80efac562244a9fdd14efbf33ab37
|
7
|
+
data.tar.gz: a32f96fccd55f6ecb77605a3d20ed51ee7913d807a1bdab9c2274abefafac279fec24486210091cb846907f792575dc1941f323cb9db22ba243af0ba105aba68
|
@@ -29,4 +29,4 @@ jobs:
|
|
29
29
|
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
|
30
30
|
chmod 0600 ~/.gem/credentials
|
31
31
|
- name: Publish gem to GitHub packages
|
32
|
-
run: gem push --key github --host https://rubygems.pkg.github.com/
|
32
|
+
run: gem push --key github --host https://rubygems.pkg.github.com/puppetlabs *.gem
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [4.1.0](https://github.com/puppetlabs/beaker-puppet/tree/4.1.0) (2024-05-31)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/4.0.0...4.1.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- Add support for Ubuntu 24.04 [\#257](https://github.com/puppetlabs/beaker-puppet/pull/257) ([joshcooper](https://github.com/joshcooper))
|
12
|
+
|
13
|
+
## [4.0.0](https://github.com/puppetlabs/beaker-puppet/tree/4.0.0) (2024-05-28)
|
14
|
+
|
15
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/3.0.1...4.0.0)
|
16
|
+
|
17
|
+
**Breaking changes:**
|
18
|
+
|
19
|
+
- Add support for Beaker 6 [\#255](https://github.com/puppetlabs/beaker-puppet/pull/255) ([mhashizume](https://github.com/mhashizume))
|
20
|
+
- Remove unsupported network platforms [\#254](https://github.com/puppetlabs/beaker-puppet/pull/254) ([mhashizume](https://github.com/mhashizume))
|
21
|
+
|
5
22
|
## [3.0.1](https://github.com/puppetlabs/beaker-puppet/tree/3.0.1) (2024-03-12)
|
6
23
|
|
7
24
|
[Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/3.0.0...3.0.1)
|
@@ -50,6 +67,14 @@ All notable changes to this project will be documented in this file.
|
|
50
67
|
- Bump actions/checkout from 3 to 4 [\#227](https://github.com/puppetlabs/beaker-puppet/pull/227) ([dependabot[bot]](https://github.com/apps/dependabot))
|
51
68
|
- Update voxpupuli-rubocop requirement from ~\> 1.2 to ~\> 2.0 [\#226](https://github.com/puppetlabs/beaker-puppet/pull/226) ([dependabot[bot]](https://github.com/apps/dependabot))
|
52
69
|
|
70
|
+
## [2.1.0](https://github.com/puppetlabs/beaker-puppet/tree/2.1.0) (2024-03-19)
|
71
|
+
|
72
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/2.0.0...2.1.0)
|
73
|
+
|
74
|
+
**Implemented enhancements:**
|
75
|
+
|
76
|
+
- \[PA-6181\]: Fix acceptance test failure caused due to addition of Amazon Linux 2023 in pe-client-tools for orchestrator client pipeline [\#250](https://github.com/puppetlabs/beaker-puppet/pull/250) ([span786](https://github.com/span786))
|
77
|
+
|
53
78
|
## [2.0.0](https://github.com/puppetlabs/beaker-puppet/tree/2.0.0) (2023-05-05)
|
54
79
|
|
55
80
|
[Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/1.29.0...2.0.0)
|
data/beaker-puppet.gemspec
CHANGED
@@ -29,6 +29,6 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency 'beaker-vmpooler', '~> 1.4'
|
30
30
|
|
31
31
|
# Run time dependencies
|
32
|
-
s.add_runtime_dependency 'beaker', '
|
32
|
+
s.add_runtime_dependency 'beaker', '>= 5.0', '< 7'
|
33
33
|
s.add_runtime_dependency 'oga', '~> 3.4'
|
34
34
|
end
|
@@ -303,7 +303,7 @@ module Beaker
|
|
303
303
|
family = ::Regexp.last_match(1)
|
304
304
|
relver = ::Regexp.last_match(2)
|
305
305
|
install_puppet_from_rpm_on(host, opts.merge(release: relver, family: family))
|
306
|
-
elsif host['platform'] =~ /(ubuntu|debian
|
306
|
+
elsif host['platform'] =~ /(ubuntu|debian)/
|
307
307
|
install_puppet_from_deb_on(host, opts)
|
308
308
|
elsif host['platform'] =~ /windows/
|
309
309
|
relver = opts[:version]
|
@@ -406,10 +406,10 @@ module Beaker
|
|
406
406
|
end
|
407
407
|
|
408
408
|
case host['platform']
|
409
|
-
when /amazon|el-|redhat|fedora|sles|centos
|
409
|
+
when /amazon|el-|redhat|fedora|sles|centos/
|
410
410
|
package_name = 'puppet-agent'
|
411
411
|
package_name << "-#{opts[:puppet_agent_version]}" if opts[:puppet_agent_version]
|
412
|
-
when /debian|ubuntu
|
412
|
+
when /debian|ubuntu/
|
413
413
|
package_name = 'puppet-agent'
|
414
414
|
if opts[:puppet_agent_version]
|
415
415
|
package_name << "=#{opts[:puppet_agent_version]}-1#{host['platform'].codename}"
|
@@ -921,9 +921,9 @@ module Beaker
|
|
921
921
|
|
922
922
|
unless host.check_for_command('gem')
|
923
923
|
gempkg = case host['platform']
|
924
|
-
when /solaris-11/
|
925
|
-
when /ubuntu-14/
|
926
|
-
when /solaris-10|ubuntu|debian|el
|
924
|
+
when /solaris-11/ then 'ruby-18'
|
925
|
+
when /ubuntu-14/ then 'ruby'
|
926
|
+
when /solaris-10|ubuntu|debian|el-/ then 'rubygems'
|
927
927
|
when /openbsd/ then 'ruby'
|
928
928
|
else
|
929
929
|
raise 'install_puppet() called with default_action ' +
|
@@ -937,7 +937,7 @@ module Beaker
|
|
937
937
|
# Link 'gem' to /usr/bin instead of adding /opt/csw/bin to PATH.
|
938
938
|
on host, 'ln -s /opt/csw/bin/gem /usr/bin/gem' if is_solaris10
|
939
939
|
|
940
|
-
if host['platform'] =~ /debian|ubuntu|solaris
|
940
|
+
if host['platform'] =~ /debian|ubuntu|solaris/
|
941
941
|
gem_env = YAML.load(on(host, 'gem environment').stdout)
|
942
942
|
gem_paths_array = gem_env['RubyGems Environment'].find { |h| h['GEM PATHS'] != nil }['GEM PATHS']
|
943
943
|
path_with_gem = 'export PATH=' + gem_paths_array.join(':') + ':${PATH}'
|
@@ -993,16 +993,8 @@ module Beaker
|
|
993
993
|
opts = sanitize_opts(opts)
|
994
994
|
|
995
995
|
case variant
|
996
|
-
when /^(amazon|fedora|el|redhat|centos|sles
|
996
|
+
when /^(amazon|fedora|el|redhat|centos|sles)$/
|
997
997
|
variant_url_value = (%w[redhat centos].include?(::Regexp.last_match(1)) ? 'el' : ::Regexp.last_match(1))
|
998
|
-
if variant == 'cisco_nexus'
|
999
|
-
variant_url_value = 'cisco-wrlinux'
|
1000
|
-
version = '5'
|
1001
|
-
end
|
1002
|
-
if variant == 'cisco_ios_xr'
|
1003
|
-
variant_url_value = 'cisco-wrlinux'
|
1004
|
-
version = '7'
|
1005
|
-
end
|
1006
998
|
if repo_name.match(/puppet\d*/)
|
1007
999
|
url = if repo_name.match(/-nightly$/)
|
1008
1000
|
opts[:nightly_yum_repo_url]
|
@@ -1028,19 +1020,11 @@ module Beaker
|
|
1028
1020
|
end
|
1029
1021
|
end
|
1030
1022
|
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
elsif variant == 'cisco_ios_xr'
|
1035
|
-
# cisco ios xr requires using yum to localinstall the repo
|
1036
|
-
on host, "yum -y localinstall #{remote}"
|
1037
|
-
else
|
1038
|
-
opts[:package_proxy] ||= false
|
1039
|
-
host.install_package_with_rpm(remote, '--replacepkgs',
|
1040
|
-
{ package_proxy: opts[:package_proxy] })
|
1041
|
-
end
|
1023
|
+
opts[:package_proxy] ||= false
|
1024
|
+
host.install_package_with_rpm(remote, '--replacepkgs',
|
1025
|
+
{ package_proxy: opts[:package_proxy] })
|
1042
1026
|
|
1043
|
-
when /^(debian|ubuntu
|
1027
|
+
when /^(debian|ubuntu)$/
|
1044
1028
|
if repo_name.match(/puppet\d*/)
|
1045
1029
|
url = if repo_name.match(/-nightly$/)
|
1046
1030
|
opts[:nightly_apt_repo_url]
|
@@ -1111,14 +1095,10 @@ module Beaker
|
|
1111
1095
|
File.write(repo, contents)
|
1112
1096
|
end
|
1113
1097
|
|
1114
|
-
to_path =
|
1115
|
-
"#{host.package_config_dir}/#{File.basename(repo)}"
|
1116
|
-
else
|
1117
|
-
host.package_config_dir
|
1118
|
-
end
|
1098
|
+
to_path = host.package_config_dir
|
1119
1099
|
scp_to(host, repo, to_path)
|
1120
1100
|
|
1121
|
-
on(host, 'apt-get update') if host['platform'] =~ /ubuntu-|debian
|
1101
|
+
on(host, 'apt-get update') if host['platform'] =~ /ubuntu-|debian-/
|
1122
1102
|
nil
|
1123
1103
|
end
|
1124
1104
|
|
@@ -1148,7 +1128,7 @@ module Beaker
|
|
1148
1128
|
repo_configs_dir = nil,
|
1149
1129
|
opts = options)
|
1150
1130
|
variant, version, arch, codename = host['platform'].to_array
|
1151
|
-
if variant !~ /^(amazon|fedora|el|redhat|centos|debian|ubuntu|
|
1131
|
+
if variant !~ /^(amazon|fedora|el|redhat|centos|debian|ubuntu|sles)$/
|
1152
1132
|
raise "No repository installation step for #{variant} yet..."
|
1153
1133
|
end
|
1154
1134
|
|
@@ -1181,7 +1161,7 @@ module Beaker
|
|
1181
1161
|
# @note This method is paired to be run directly after {#install_puppetlabs_dev_repo}
|
1182
1162
|
#
|
1183
1163
|
def install_packages_from_local_dev_repo(host, package_name)
|
1184
|
-
if host['platform'] =~ /debian|ubuntu
|
1164
|
+
if host['platform'] =~ /debian|ubuntu/
|
1185
1165
|
find_filename = '*.deb'
|
1186
1166
|
find_command = 'dpkg -i'
|
1187
1167
|
elsif host['platform'] =~ /fedora|el|redhat|centos/
|
@@ -1269,7 +1249,7 @@ module Beaker
|
|
1269
1249
|
|
1270
1250
|
# We have to do some silly version munging if we're on a deb-based platform
|
1271
1251
|
case host['platform']
|
1272
|
-
when /debian|ubuntu
|
1252
|
+
when /debian|ubuntu/
|
1273
1253
|
opts[:version] = "#{opts[:version]}-1#{host['platform'].codename}" if opts[:version]
|
1274
1254
|
end
|
1275
1255
|
|
@@ -1291,7 +1271,7 @@ module Beaker
|
|
1291
1271
|
cmdline_args = ''
|
1292
1272
|
# query packages
|
1293
1273
|
case host[:platform]
|
1294
|
-
when /
|
1274
|
+
when /ubuntu/
|
1295
1275
|
pkgs = on(host, "dpkg-query -l | awk '{print $2}' | grep -E '(^pe-|puppet)'",
|
1296
1276
|
acceptable_exit_codes: [0, 1]).stdout.chomp.split(/\n+/)
|
1297
1277
|
when /aix|sles|el|redhat|centos|oracle|scientific/
|
@@ -217,7 +217,12 @@ module Beaker
|
|
217
217
|
|
218
218
|
install_targets.each do |host|
|
219
219
|
artifact_url, repoconfig_url = host_urls(host, build_details, base_url)
|
220
|
-
if
|
220
|
+
if host.platform.variant == 'ubuntu' && host.platform.version.to_f >= 24.04
|
221
|
+
# install the specific artifact we built, not based on how its repos are configured
|
222
|
+
tmp_file = host.tmpfile('puppet-agent')
|
223
|
+
on(host, "curl -L --output #{tmp_file} #{artifact_url}")
|
224
|
+
host.install_local_package(tmp_file)
|
225
|
+
elsif repoconfig_url.nil?
|
221
226
|
install_artifact_on(host, artifact_url, project_name)
|
222
227
|
else
|
223
228
|
install_repo_configs_on(host, repoconfig_url)
|
@@ -818,48 +818,6 @@ describe ClassMixedWithDSLInstallUtils do
|
|
818
818
|
subject.install_puppetlabs_release_repo_on(host)
|
819
819
|
end
|
820
820
|
end
|
821
|
-
|
822
|
-
context 'on debian 8' do
|
823
|
-
let(:platform) { Beaker::Platform.new('debian-8-i386') }
|
824
|
-
it 'returns the correct url when repo is set to puppet4' do
|
825
|
-
expect(subject).to receive(:on).with(host, /puppet4-release-jessie\.deb$/).once
|
826
|
-
expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
|
827
|
-
expect(subject).to receive(:on).with(host, 'apt-get update').once
|
828
|
-
subject.install_puppetlabs_release_repo_on(host, 'puppet4')
|
829
|
-
end
|
830
|
-
it 'returns the correct url when opts[:puppet_collection] is set to puppet7' do
|
831
|
-
expect(subject).to receive(:on).with(host, /puppet7-release-jessie\.deb$/).once
|
832
|
-
expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
|
833
|
-
expect(subject).to receive(:on).with(host, 'apt-get update').once
|
834
|
-
subject.install_puppetlabs_release_repo_on(host, nil, { puppet_collection: 'puppet7' })
|
835
|
-
end
|
836
|
-
it 'returns the correct url when both repo and opts[:puppet_collection] are nil' do
|
837
|
-
expect(subject).to receive(:on).with(host, /puppet-release-jessie\.deb$/).once
|
838
|
-
expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
|
839
|
-
expect(subject).to receive(:on).with(host, 'apt-get update').once
|
840
|
-
subject.install_puppetlabs_release_repo_on(host)
|
841
|
-
end
|
842
|
-
end
|
843
|
-
|
844
|
-
context 'on cisco platforms' do
|
845
|
-
context 'version 5' do
|
846
|
-
let(:platform) { Beaker::Platform.new('cisco_nexus-7-x86_64') }
|
847
|
-
|
848
|
-
it 'calls host.install_package' do
|
849
|
-
expect(host).to receive(:install_package).with(/\.rpm$/)
|
850
|
-
subject.install_puppetlabs_release_repo_on(host)
|
851
|
-
end
|
852
|
-
end
|
853
|
-
|
854
|
-
context 'version 7' do
|
855
|
-
let(:platform) { Beaker::Platform.new('cisco_ios_xr-6-x86_64') }
|
856
|
-
|
857
|
-
it 'uses yum localinstall to install the package' do
|
858
|
-
expect(subject).to receive(:on).with(host, /^yum.*localinstall.*\.rpm$/)
|
859
|
-
subject.install_puppetlabs_release_repo_on(host)
|
860
|
-
end
|
861
|
-
end
|
862
|
-
end
|
863
821
|
end
|
864
822
|
|
865
823
|
describe '#install_puppetlabs_dev_repo' do
|
@@ -884,6 +842,8 @@ describe ClassMixedWithDSLInstallUtils do
|
|
884
842
|
allow(rez).to receive(:exit_code) { 0 }
|
885
843
|
allow(subject).to receive(:link_exists?).and_return(true)
|
886
844
|
expect(subject).to receive(:scp_to).with(host, repo_config, /.*/).ordered
|
845
|
+
allow(File).to receive(:read).and_call_original
|
846
|
+
allow(File).to receive(:read).with('repoconfig').and_return('')
|
887
847
|
subject.install_puppetlabs_dev_repo host, package_name, package_version
|
888
848
|
end
|
889
849
|
end
|
@@ -960,7 +920,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
960
920
|
end
|
961
921
|
|
962
922
|
it 'fails correctly for systems not accounted for' do
|
963
|
-
@platform = '
|
923
|
+
@platform = 'freebsd-1-3'
|
964
924
|
expect { subject.install_packages_from_local_dev_repo(host, package_name) }.to raise_error RuntimeError
|
965
925
|
end
|
966
926
|
end
|
@@ -1108,10 +1068,10 @@ describe ClassMixedWithDSLInstallUtils do
|
|
1108
1068
|
version = '6.6.6'
|
1109
1069
|
|
1110
1070
|
context 'on deb-based platform' do
|
1111
|
-
let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-
|
1112
|
-
it 'munges the version on ubuntu
|
1071
|
+
let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-24.04-amd64')) }
|
1072
|
+
it 'munges the version on ubuntu 24.04' do
|
1113
1073
|
expect(subject).to receive(:install_puppetlabs_release_repo_on).with(host, 'puppet', anything)
|
1114
|
-
expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-
|
1074
|
+
expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-1noble")
|
1115
1075
|
allow(subject).to receive(:dev_builds_accessible_on?).with(host, anything).and_return false
|
1116
1076
|
subject.install_puppetserver_on(host, version: version)
|
1117
1077
|
end
|
@@ -12,7 +12,7 @@ end
|
|
12
12
|
describe ClassMixedWithDSLInstallUtils do
|
13
13
|
let(:hosts) do
|
14
14
|
make_hosts({ pe_ver: '3.0',
|
15
|
-
platform: '
|
15
|
+
platform: Beaker::Platform.new('redhat-9-x86_64'),
|
16
16
|
roles: ['agent'],
|
17
17
|
type: 'foss', }, 4)
|
18
18
|
end
|
@@ -363,6 +363,23 @@ describe ClassMixedWithDSLInstallUtils do
|
|
363
363
|
end.to raise_error(Beaker::DSL::Outcomes::FailTest, /project_name.*#{sha_yaml_url}/)
|
364
364
|
end
|
365
365
|
|
366
|
+
it 'installs the artifact on newer Ubuntu hosts' do
|
367
|
+
artifact_url = 'https://builds.example.com/puppet-agent.deb'
|
368
|
+
project_name = 'fake_project_66'
|
369
|
+
allow(subject).to receive(:fetch_build_details)
|
370
|
+
allow(subject).to receive(:configure_type_defaults_on)
|
371
|
+
allow(subject).to receive(:host_urls) { [artifact_url, ''] }
|
372
|
+
|
373
|
+
hosts = [make_host('host.example.com', platform: Beaker::Platform.new('ubuntu-24.04-x86_64'))]
|
374
|
+
allow(subject).to receive(:hosts).and_return(hosts)
|
375
|
+
hosts.each do |host|
|
376
|
+
allow(host).to receive(:tmpfile).and_return('/tmp/puppet-agent.GcHvLR')
|
377
|
+
allow(subject).to receive(:on).with(host, /^curl/)
|
378
|
+
expect(host).to receive(:install_local_package).with('/tmp/puppet-agent.GcHvLR')
|
379
|
+
end
|
380
|
+
subject.install_from_build_data_url(project_name, 'sha_yaml_url')
|
381
|
+
end
|
382
|
+
|
366
383
|
it 'runs host.install_package instead of #install_artifact_on if theres a repo_config' do
|
367
384
|
repoconfig_url = 'pants/man/shoot/to/the/stars'
|
368
385
|
project_name = 'fake_project_66'
|
data/spec/helpers.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03
|
11
|
+
date: 2024-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakefs
|
@@ -104,16 +104,22 @@ dependencies:
|
|
104
104
|
name: beaker
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '5.0'
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '7'
|
110
113
|
type: :runtime
|
111
114
|
prerelease: false
|
112
115
|
version_requirements: !ruby/object:Gem::Requirement
|
113
116
|
requirements:
|
114
|
-
- - "
|
117
|
+
- - ">="
|
115
118
|
- !ruby/object:Gem::Version
|
116
119
|
version: '5.0'
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '7'
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
124
|
name: oga
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|