beaker-pe 2.19.0 → 3.0.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: afc61dd291107e1ad7cffa9e81b05fb014b3ef62adeb70a845d4a665ac3c9a0e
4
- data.tar.gz: d4d91fdbd13366ee33486731a7fa87410945f70e5fe20a0a21093232a11a6ada
3
+ metadata.gz: e9f0ff78ec64afd7941966459c4af7aa09ec2fe632314a5e31c1c41ede5a9876
4
+ data.tar.gz: cf2ab7e224f2d468889f97c750b51f655fa35758331fe2d6264baf8afc9e8894
5
5
  SHA512:
6
- metadata.gz: 9ca2004c8eb331b1faa5e50b1611ba6336f1f0043145e05475127a9e5dcdd266e0fd0618a473643c05bb8288277bbd5e89cf903136af993dc1b5a13c4d0a787d
7
- data.tar.gz: a602e24248c5ba135e9a92811e6895eeb974a8f6bb0eb633a1a80b85c7c0a5add37c4ea2437f69c003524604b0d210cbbcd0545d8f70402207a5aa94ac00ad1b
6
+ metadata.gz: 0e9afe28fa995067d31c0aa18189a9728f6f837876b6ebdda59522c4203ae26e4f7047939df45581eaa8dcdb670523f2eab0dbf202720f0a531520e802694a90
7
+ data.tar.gz: 46d3f8dcfd72fff77f86b57f27ccf91e8c3903185da4059b55f95564109a941b37c7f657b912b8c80c127594394dda32d8b9559b214475db4aa07ea737364021
@@ -36,6 +36,27 @@ jobs:
36
36
  return response.tag_name
37
37
  result-encoding: string
38
38
 
39
+ - name: Generate Changelog
40
+ uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
41
+ with:
42
+ args: >-
43
+ --future-release ${{ steps.nv.outputs.version }}
44
+ env:
45
+ CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46
+
47
+ - name: Validate Changelog
48
+ run : |
49
+ set -e
50
+ if output=$(git status --porcelain) && [ ! -z "$output" ]; then
51
+ echo "Here is the current git status:"
52
+ git status
53
+ echo
54
+ echo "The following changes were detected:"
55
+ git --no-pager diff
56
+ echo "Uncommitted PRs found in the changelog. Please submit a release prep PR of changes after running './release-prep'"
57
+ exit 1
58
+ fi
59
+
39
60
  - name: Generate Release Notes
40
61
  uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
41
62
  with:
data/CHANGELOG.md CHANGED
@@ -1,21 +1,5 @@
1
1
  # Changelog
2
2
 
3
- ## [2.16.1](https://github.com/puppetlabs/beaker-pe/tree/2.16.1) (2024-04-04)
4
-
5
- [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.0.0...2.16.1)
6
-
7
- **Implemented enhancements:**
8
-
9
- - \(PE-37704\) Allow for SLES-11 \(Intel\) builds to be installed in PE 2021.7.x for testing [\#259](https://github.com/puppetlabs/beaker-pe/pull/259) ([shubhamshinde360](https://github.com/shubhamshinde360))
10
-
11
- **Merged pull requests:**
12
-
13
- - Bump yard from 0.9.35 to 0.9.36 [\#258](https://github.com/puppetlabs/beaker-pe/pull/258) ([dependabot[bot]](https://github.com/apps/dependabot))
14
- - Bump rack from 2.2.8 to 2.2.8.1 [\#257](https://github.com/puppetlabs/beaker-pe/pull/257) ([dependabot[bot]](https://github.com/apps/dependabot))
15
- - Bump yard from 0.9.34 to 0.9.35 [\#256](https://github.com/puppetlabs/beaker-pe/pull/256) ([dependabot[bot]](https://github.com/apps/dependabot))
16
- - Bump activesupport from 7.1.3 to 7.1.3.2 [\#255](https://github.com/puppetlabs/beaker-pe/pull/255) ([dependabot[bot]](https://github.com/apps/dependabot))
17
- - Bump scooter from 4.5.0 to 4.5.4 [\#254](https://github.com/puppetlabs/beaker-pe/pull/254) ([dependabot[bot]](https://github.com/apps/dependabot))
18
-
19
3
  ## [3.0.0](https://github.com/puppetlabs/beaker-pe/tree/3.0.0) (2024-02-07)
20
4
 
21
5
  [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/2.16.0...3.0.0)
data/Gemfile.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- beaker-pe (2.19.0)
4
+ beaker-pe (3.0.0)
5
5
  beaker (>= 4.0, < 6)
6
6
  beaker-abs
7
- beaker-answers (~> 0.0)
8
- beaker-puppet (>= 1)
7
+ beaker-answers (~> 1.0)
8
+ beaker-puppet (>= 1, < 3)
9
9
  beaker-vmpooler (~> 1.0)
10
10
  stringify-hash (~> 0.0.0)
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (7.1.1)
15
+ activesupport (7.1.3)
16
16
  base64
17
17
  bigdecimal
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -24,9 +24,9 @@ GEM
24
24
  tzinfo (~> 2.0)
25
25
  ansi (1.5.0)
26
26
  ast (2.4.2)
27
- base64 (0.1.1)
27
+ base64 (0.2.0)
28
28
  bcrypt_pbkdf (1.1.0)
29
- beaker (4.40.2)
29
+ beaker (4.41.2)
30
30
  beaker-hostgenerator
31
31
  ed25519 (~> 1.0)
32
32
  hocon (~> 1.0)
@@ -45,30 +45,29 @@ GEM
45
45
  beaker (~> 4.0)
46
46
  ed25519 (>= 1.2, < 2.0)
47
47
  vmfloaty (>= 1.0, < 2)
48
- beaker-answers (0.29.0)
48
+ beaker-answers (1.0.0)
49
49
  hocon (~> 1.0)
50
50
  require_all (>= 1.3.2, < 3.1.0)
51
51
  stringify-hash (~> 0.0.0)
52
- beaker-hostgenerator (2.2.3)
52
+ beaker-hostgenerator (2.9.1)
53
53
  deep_merge (~> 1.0)
54
54
  beaker-puppet (2.0.0)
55
55
  beaker (~> 4.1)
56
56
  oga (~> 3.4)
57
57
  beaker-vmpooler (1.4.0)
58
58
  stringify-hash (~> 0.0.0)
59
- bigdecimal (3.1.4)
59
+ bigdecimal (3.1.6)
60
60
  coderay (1.1.3)
61
61
  commander (4.6.0)
62
62
  highline (~> 2.0.0)
63
- concurrent-ruby (1.2.2)
63
+ concurrent-ruby (1.2.3)
64
64
  connection_pool (2.4.1)
65
65
  daemons (1.4.1)
66
66
  deep_merge (1.2.2)
67
- diff-lcs (1.5.0)
67
+ diff-lcs (1.5.1)
68
68
  docile (1.4.0)
69
- domain_name (0.5.20190701)
70
- unf (>= 0.0.5, < 1.0.0)
71
- drb (2.1.1)
69
+ domain_name (0.6.20240107)
70
+ drb (2.2.0)
72
71
  ruby2_keywords
73
72
  ed25519 (1.3.0)
74
73
  eventmachine (1.2.7)
@@ -107,10 +106,10 @@ GEM
107
106
  domain_name (~> 0.5)
108
107
  i18n (1.14.1)
109
108
  concurrent-ruby (~> 1.0)
110
- in-parallel (1.0.0)
109
+ in-parallel (1.0.1)
111
110
  inifile (3.0.0)
112
111
  iniparser (1.0.1)
113
- json (2.6.3)
112
+ json (2.7.1)
114
113
  kramdown (2.4.0)
115
114
  rexml
116
115
  logutils (0.6.1)
@@ -120,13 +119,13 @@ GEM
120
119
  textutils (>= 0.10.0)
121
120
  method_source (1.0.0)
122
121
  minitar (0.9)
123
- minitest (5.20.0)
122
+ minitest (5.21.2)
124
123
  multipart-post (2.3.0)
125
- mutex_m (0.1.2)
126
- net-ldap (0.16.3)
124
+ mutex_m (0.2.0)
125
+ net-ldap (0.19.0)
127
126
  net-scp (4.0.0)
128
127
  net-ssh (>= 2.6.5, < 8.0.0)
129
- net-ssh (7.2.0)
128
+ net-ssh (7.2.1)
130
129
  oga (3.4)
131
130
  ast
132
131
  ruby-ll (~> 2.1)
@@ -136,39 +135,39 @@ GEM
136
135
  pry (0.14.2)
137
136
  coderay (~> 1.1)
138
137
  method_source (~> 1.0)
139
- rack (2.2.7)
138
+ rack (2.2.8)
140
139
  rake (13.1.0)
141
140
  require_all (3.0.0)
142
141
  rexml (3.2.6)
143
- rspec (3.12.0)
144
- rspec-core (~> 3.12.0)
145
- rspec-expectations (~> 3.12.0)
146
- rspec-mocks (~> 3.12.0)
147
- rspec-core (3.12.2)
148
- rspec-support (~> 3.12.0)
149
- rspec-expectations (3.12.3)
142
+ rspec (3.13.0)
143
+ rspec-core (~> 3.13.0)
144
+ rspec-expectations (~> 3.13.0)
145
+ rspec-mocks (~> 3.13.0)
146
+ rspec-core (3.13.0)
147
+ rspec-support (~> 3.13.0)
148
+ rspec-expectations (3.13.0)
150
149
  diff-lcs (>= 1.2.0, < 2.0)
151
- rspec-support (~> 3.12.0)
150
+ rspec-support (~> 3.13.0)
152
151
  rspec-its (1.3.0)
153
152
  rspec-core (>= 3.0.0)
154
153
  rspec-expectations (>= 3.0.0)
155
- rspec-mocks (3.12.5)
154
+ rspec-mocks (3.13.0)
156
155
  diff-lcs (>= 1.2.0, < 2.0)
157
- rspec-support (~> 3.12.0)
158
- rspec-support (3.12.0)
156
+ rspec-support (~> 3.13.0)
157
+ rspec-support (3.13.0)
159
158
  rsync (1.0.9)
160
- ruby-ll (2.1.2)
159
+ ruby-ll (2.1.3)
161
160
  ansi
162
161
  ast
163
162
  ruby2_keywords (0.0.5)
164
163
  rubyzip (2.3.2)
165
- scooter (4.4.0)
166
- beaker (~> 4.0)
167
- faraday (~> 1.5)
168
- faraday-cookie_jar (~> 0.0, >= 0.0.7)
164
+ scooter (4.5.0)
165
+ beaker
166
+ faraday
167
+ faraday-cookie_jar (>= 0.0.7)
169
168
  faraday_middleware (~> 1.2)
170
- json (>= 2.3.0)
171
- net-ldap (~> 0.16.0)
169
+ json
170
+ net-ldap (~> 0.16)
172
171
  test-unit
173
172
  simplecov (0.22.0)
174
173
  docile (~> 1.1)
@@ -177,7 +176,7 @@ GEM
177
176
  simplecov-html (0.12.3)
178
177
  simplecov_json_formatter (0.1.4)
179
178
  stringify-hash (0.0.2)
180
- test-unit (3.5.7)
179
+ test-unit (3.6.1)
181
180
  power_assert
182
181
  textutils (1.4.0)
183
182
  activesupport
@@ -188,13 +187,10 @@ GEM
188
187
  daemons (~> 1.0, >= 1.0.9)
189
188
  eventmachine (~> 1.0, >= 1.0.4)
190
189
  rack (>= 1, < 3)
191
- thor (1.2.2)
190
+ thor (1.3.0)
192
191
  tzinfo (2.0.6)
193
192
  concurrent-ruby (~> 1.0)
194
- unf (0.1.4)
195
- unf_ext
196
- unf_ext (0.0.8.2)
197
- vmfloaty (1.8.0)
193
+ vmfloaty (1.8.1)
198
194
  commander (>= 4.4.3, < 4.7.0)
199
195
  faraday (~> 1.5, >= 1.5.1)
200
196
  yard (0.9.34)
@@ -223,4 +219,4 @@ DEPENDENCIES
223
219
  yard
224
220
 
225
221
  BUNDLED WITH
226
- 2.4.22
222
+ 2.3.23
data/README.md CHANGED
@@ -66,7 +66,7 @@ with spec testing by running the `test:spec:coverage` rake task.
66
66
 
67
67
  Acceptance tests live in the `acceptance/tests` folder. These are Beaker tests,
68
68
  & are dependent on having Beaker installed. Note that this will happen with a
69
- `bundle install` execution, but can be avoided if you're not looking to run
69
+ `bundle install` execution, but can be avoided if you're not looking to run
70
70
  acceptance tests by ignoring the `acceptance_testing` gem group.
71
71
 
72
72
  You can run the acceptance testing suite by invoking the `test:acceptance` rake
@@ -77,6 +77,11 @@ you'd like to provide your own hosts file, set the `CONFIG` environment variable
77
77
 
78
78
  ## Releasing
79
79
 
80
+ Prerequisites (without these steps you will almost certainly hit API rate limits):
81
+
82
+ 1. Generate [an API token](https://github.com/settings/tokens) with repository permissions and authorize the Puppet organization after generating.
83
+ 2. Export that token as `CHANGELOG_GITHUB_TOKEN`
84
+
80
85
  Open a release prep PR and run the release action:
81
86
 
82
87
  1. Bump the "version" parameter in `lib/beaker-pe/version.rb` appropriately based merged pull requests since the last release.
data/beaker-pe.gemspec CHANGED
@@ -32,10 +32,10 @@ Gem::Specification.new do |s|
32
32
  s.add_development_dependency 'thin'
33
33
 
34
34
  # Run time dependencies
35
- s.add_runtime_dependency 'beaker', '>= 4.0', '< 7'
36
- s.add_runtime_dependency 'beaker-puppet', '>=1'
35
+ s.add_runtime_dependency 'beaker', '>= 4.0', '< 6'
36
+ s.add_runtime_dependency 'beaker-puppet', '>=1', '<3'
37
37
  s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
38
- s.add_runtime_dependency 'beaker-answers', '~> 0.0'
38
+ s.add_runtime_dependency 'beaker-answers', '~> 1.0'
39
39
  s.add_runtime_dependency 'beaker-abs'
40
40
  s.add_runtime_dependency 'beaker-vmpooler', '~> 1.0'
41
41
 
@@ -325,24 +325,6 @@ module Beaker
325
325
  end
326
326
  end
327
327
 
328
- # Determine the build package to download on a sles-11 (Intel) host, install that package onto the host.
329
- # Assumed file name format: puppet-agent-7.29.1.26.gf344eeefa-1.sles11.x86_64.rpm.
330
- # This method should be called after puppet is installed on the master since it relies on the master
331
- # telling it the puppet agent version to form the download URL.
332
- # @param [Host] host The sles-11 host to download and install the package on.
333
- # @param [Hash{Symbol=>Symbol, String}] opts The options
334
- # @api private
335
- def install_rpm_on_sles11_host(host, puppet_agent_ver, opts)
336
- # Since sles11 builds are not available in PE, download from agent-downloads.
337
- agent_downloads_url = "http://agent-downloads.delivery.puppetlabs.net/puppet-agent"
338
- master_aio_version = puppet_fact(master, 'aio_agent_build')
339
- stream = opts[:puppet_collection] || "puppet#{puppet_agent_ver[0]}"
340
- path = "#{agent_downloads_url}/#{puppet_agent_ver}/repos/sles/11/#{stream}/x86_64"
341
- filename = "puppet-agent-#{master_aio_version}-1.sles11.x86_64"
342
- extension = ".rpm"
343
- host.install_package_with_rpm("#{path}/#{filename}#{extension}")
344
- end
345
-
346
328
  #Determine the PE package to download/upload on a windows host, download/upload that package onto the host.
347
329
  #Assumed file name format: puppet-enterprise-3.3.0-rc1-559-g97f0833.msi
348
330
  # @param [Host] host The windows host to download/upload and unpack PE onto
@@ -891,231 +873,6 @@ module Beaker
891
873
  end
892
874
  end
893
875
 
894
- # Gets host-specific information for PE promoted puppet-agent packages (Mac version)
895
- #
896
- # @param [Host] host
897
- # @param [String] puppet_collection Name of the puppet collection to use
898
- # @param [Hash{Symbol=>String}] opts Options hash to provide extra values
899
- #
900
- # @return [String, String, String] Host-specific information for packages
901
- # 1. release_path_end Suffix for the release_path. Used on Windows. Check
902
- # {Windows::Pkg#pe_puppet_agent_promoted_package_info} to see usage.
903
- # 2. release_file Path to the file on release build servers
904
- # 3. download_file Filename for the package itself
905
- def pe_puppet_agent_promoted_package_info_mac(host, puppet_collection = nil, opts = {} )
906
- error_message = "Must provide %s argument to get puppet agent dev package information"
907
- raise ArgumentError, error_message % "puppet_collection" unless puppet_collection
908
-
909
- variant, version, arch, _codename = host['platform'].to_array
910
- release_file = "/repos/apple/#{version}/#{puppet_collection}/#{arch}/puppet-agent-*"
911
-
912
- # macOS puppet-agent tarballs haven't always included arch
913
- agent_version = opts[:puppet_agent_version]
914
- agent_version_f = agent_version&.to_f
915
-
916
- download_file = if agent_version_f.nil? || (agent_version_f < 6.28 || (agent_version_f >= 7.0 && agent_version_f < 7.18))
917
- "puppet-agent-#{variant}-#{version}.tar.gz"
918
- else
919
- "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
920
- end
921
-
922
- return '', release_file, download_file
923
- end
924
-
925
- # Gets host-specific information for PE promoted puppet-agent packages (Windows version)
926
- #
927
- # @param [Host] host
928
- # @param [String] puppet_collection Name of the puppet collection to use
929
- # @param [Hash{Symbol=>String}] opts Options hash to provide extra values
930
- #
931
- # @return [String, String, String] Host-specific information for packages
932
- # 1. release_path_end Suffix for the release_path
933
- # 2. release_file Path to the file on release build servers
934
- # 3. download_file Filename for the package itself
935
- def pe_puppet_agent_promoted_package_info_windows(host, _puppet_collection = nil, _opts = {} )
936
- is_config_32 = host['ruby_arch'] == 'x86' || host['install_32'] || host['install_32']
937
- should_install_64bit = host.is_x86_64? && !is_config_32
938
- # only install 64bit builds if
939
- # - we do not have install_32 set on host
940
- # - we do not have install_32 set globally
941
- arch_suffix = should_install_64bit ? '64' : '86'
942
- release_path_end = "/windows"
943
- release_file = "/puppet-agent-x#{arch_suffix}.msi"
944
- download_file = "puppet-agent-x#{arch_suffix}.msi"
945
- return release_path_end, release_file, download_file
946
- end
947
-
948
- # Gets host-specific information for PE promoted puppet-agent packages (Unix version)
949
- #
950
- # @param [Host] host
951
- # @param [String] puppet_collection Name of the puppet collection to use
952
- # @param [Hash{Symbol=>String}] opts Options hash to provide extra values
953
- #
954
- # @return [String, String, String] Host-specific information for packages
955
- # 1. release_path_end Suffix for the release_path. Used on Windows. Check
956
- # {Windows::Pkg#pe_puppet_agent_promoted_package_info} to see usage.
957
- # 2. release_file Path to the file on release build servers
958
- # 3. download_file Filename for the package itself
959
- def pe_puppet_agent_promoted_package_info_unix(host, puppet_collection = nil, _opts = {} )
960
- error_message = "Must provide %s argument to get puppet agent dev package information"
961
- raise ArgumentError, error_message % "puppet_collection" unless puppet_collection
962
-
963
- variant, version, arch, codename = host['platform'].to_array
964
- case variant
965
- when /^(fedora|el|centos|redhat|opensuse|sles)$/
966
- variant = ((['centos', 'redhat'].include?(variant)) ? 'el' : variant)
967
- release_file = "/repos/#{variant}/#{version}/#{puppet_collection}/#{arch}/puppet-agent-*.rpm"
968
- download_file = "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
969
- when /^(debian|ubuntu|cumulus)$/
970
- if arch == 'x86_64'
971
- arch = 'amd64'
972
- end
973
- version = version[0,2] + '.' + version[2,2] if (variant.include?('ubuntu') && !version.include?("."))
974
- release_file = "/repos/apt/#{codename}/pool/#{puppet_collection}/p/puppet-agent/puppet-agent*#{arch}.deb"
975
- download_file = "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
976
- when /^solaris$/
977
- if arch == 'x86_64'
978
- arch = 'i386'
979
- end
980
- release_file = "/repos/solaris/#{version}/#{puppet_collection}/"
981
- download_file = "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
982
- else
983
- raise "No pe-promoted installation step for #{variant} yet..."
984
- end
985
- return '', release_file, download_file
986
- end
987
-
988
- def pe_puppet_agent_promoted_package_install_dispatch(host, onhost_copy_base, onhost_copied_download, onhost_copied_file, download_file, _opts)
989
- case host
990
- when Mac::Host
991
- return pe_puppet_agent_promoted_package_install_mac(host, onhost_copy_base, onhost_copied_download, onhost_copied_file, download_file, _opts)
992
- when Unix::Host
993
- return pe_puppet_agent_promoted_package_install_unix(host, onhost_copy_base, onhost_copied_download, onhost_copied_file, download_file, _opts)
994
- end
995
- raise RuntimeError("#{host.class} not one of Beaker::(Mac|Unix)::Host")
996
- end
997
-
998
- # Installs a given PE promoted package on a Mac host
999
- #
1000
- # @param [Host] host Host to install package on
1001
- # @param [String] onhost_copy_base Base copy directory on the host
1002
- # @param [String] onhost_copied_download Downloaded file path on the host
1003
- # @param [String] onhost_copied_file Copied file path once un-compressed
1004
- # @param [String] download_file File name of the downloaded file
1005
- # @param [Hash{Symbol=>String}] opts additional options
1006
- #
1007
- # @return nil
1008
- def pe_puppet_agent_promoted_package_install_mac(
1009
- host, onhost_copy_base, onhost_copied_download, onhost_copied_file, _download_file, _opts
1010
- )
1011
- host.execute("tar -zxvf #{onhost_copied_download} -C #{onhost_copy_base}")
1012
- # move to better location
1013
- host.execute("mv #{onhost_copied_file}.dmg .")
1014
- host.install_package("puppet-agent-*")
1015
- end
1016
-
1017
-
1018
- # Installs a given PE promoted package on a Unix host
1019
- #
1020
- # @param [Host] host Host to install package on
1021
- # @param [String] onhost_copy_base Base copy directory on the host
1022
- # @param [String] onhost_copied_download Downloaded file path on the host
1023
- # @param [String] onhost_copied_file Copied file path once un-compressed
1024
- # @param [String] download_file File name of the downloaded file
1025
- # @param [Hash{Symbol=>String}] opts additional options
1026
- #
1027
- # @return nil
1028
- def pe_puppet_agent_promoted_package_install_unix(
1029
- host, onhost_copy_base, onhost_copied_download, onhost_copied_file, download_file, _opts
1030
- )
1031
- host.uncompress_local_tarball(onhost_copied_download, onhost_copy_base, download_file )
1032
- if /^solaris/.match?(host['platform'])
1033
- # above uncompresses the install from .tar.gz -> .p5p into the
1034
- # onhost_copied_file directory w/a weird name. We have to read that file
1035
- # name from the filesystem, so that we can provide it to install_local...
1036
- pkg_filename = host.execute( "ls #{onhost_copied_file}" )
1037
- onhost_copied_file = "#{onhost_copied_file}#{pkg_filename}"
1038
- end
1039
-
1040
- host.install_local_package(onhost_copied_file, onhost_copy_base )
1041
- nil
1042
- end
1043
-
1044
- def pe_puppet_agent_promoted_package_info_dispatch(host, puppet_collection = nil, opts = {})
1045
- case host
1046
- when Windows::Host
1047
- return pe_puppet_agent_promoted_package_info_windows(host, puppet_collection, opts)
1048
- when Mac::Host
1049
- return pe_puppet_agent_promoted_package_info_mac(host, puppet_collection, opts)
1050
- when Unix::Host
1051
- return pe_puppet_agent_promoted_package_info_unix(host, puppet_collection, opts)
1052
- end
1053
- raise RuntimeError("#{host.class} not one of Beaker::(Windows|Mac|Unix)::Host")
1054
- end
1055
-
1056
- # Install shared repo of the puppet-agent on the given host(s). Downloaded from
1057
- # location of the form PE_PROMOTED_BUILDS_URL/PE_VER/puppet-agent/AGENT_VERSION/repo
1058
- #
1059
- # @param [Host, Array<Host>, String, Symbol] hosts One or more hosts to act upon,
1060
- # or a role (String or Symbol) that identifies one or more hosts.
1061
- # @param [Hash{Symbol=>String}] opts An options hash
1062
- # @option opts [String] :puppet_agent_version The version of puppet-agent to install, defaults to 'latest'
1063
- # @option opts [String] :pe_ver The version of PE (will also use host['pe_ver']), defaults to '4.0'
1064
- # @option opts [String] :copy_base_local Directory where puppet-agent artifact
1065
- # will be stored locally
1066
- # (default: 'tmp/repo_configs')
1067
- # @option opts [String] :copy_dir_external Directory where puppet-agent
1068
- # artifact will be pushed to on the external machine
1069
- # (default: '/root')
1070
- # @option opts [String] :puppet_collection Defaults to 'PC1'
1071
- # @option opts [String] :pe_promoted_builds_url Base URL to pull artifacts from
1072
- def install_puppet_agent_pe_promoted_repo_on(hosts, opts)
1073
- opts[:puppet_agent_version] ||= 'latest'
1074
-
1075
- block_on hosts do |host|
1076
- pe_ver = host[:pe_ver] || opts[:pe_ver] || '4.0.0-rc1'
1077
- opts = sanitize_opts(opts)
1078
- opts[:download_url] =
1079
- "#{opts[:pe_promoted_builds_url]}/puppet-agent/#{pe_ver}/#{opts[:puppet_agent_version]}/repos"
1080
- opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
1081
- opts[:copy_dir_external] ||= host.external_copy_base
1082
- opts[:puppet_collection] ||= puppet_collection_for(:puppet_agent, opts[:puppet_agent_version])
1083
- add_role(host, 'aio') # we are installing agent, so we want aio role
1084
- release_path = opts[:download_url]
1085
- variant, version, arch, codename = host['platform'].to_array
1086
- copy_dir_local = File.join(opts[:copy_base_local], variant)
1087
- onhost_copy_base = opts[:copy_dir_external]
1088
-
1089
- release_path_end, release_file, download_file =
1090
- pe_puppet_agent_promoted_package_info_dispatch(
1091
- host,
1092
- opts[:puppet_collection], opts
1093
- )
1094
- release_path << release_path_end
1095
-
1096
- onhost_copied_download = File.join(onhost_copy_base, download_file)
1097
- onhost_copied_file = File.join(onhost_copy_base, release_file)
1098
- fetch_http_file(release_path, download_file, copy_dir_local)
1099
- scp_to host, File.join(copy_dir_local, download_file), onhost_copy_base
1100
-
1101
- if variant == 'windows'
1102
- result = on host, "echo #{onhost_copied_file}"
1103
- onhost_copied_file = result.raw_output.chomp
1104
- opts = { debug: host[:pe_debug] || opts[:pe_debug] }
1105
- # couldn't pull this out, because it's relying on
1106
- # {Beaker::DSL::InstallUtils::WindowsUtils} methods,
1107
- # which I didn't want to attack right now. TODO
1108
- install_msi_on(host, onhost_copied_file, {}, opts)
1109
- else
1110
- pe_puppet_agent_promoted_package_install_dispatch(
1111
- host,
1112
- onhost_copy_base, onhost_copied_download,
1113
- onhost_copied_file, download_file, opts
1114
- )
1115
- end
1116
- configure_type_defaults_on(host)
1117
- end
1118
- end
1119
876
 
1120
877
  def generic_install hosts, opts = {}
1121
878
  step "Installing PE on a generic set of hosts"
@@ -1163,12 +920,8 @@ module Beaker
1163
920
  :puppet_collection => host[:puppet_collection] || opts[:puppet_collection],
1164
921
  :pe_promoted_builds_url => host[:pe_promoted_builds_url] || opts[:pe_promoted_builds_url]
1165
922
  }
1166
- if host['platform'] =~ /sles-11/
1167
- install_rpm_on_sles11_host(host, install_params[:puppet_agent_version], opts)
1168
- else
1169
- install_params.delete(:pe_promoted_builds_url) if install_params[:pe_promoted_builds_url].nil?
1170
- install_puppet_agent_pe_promoted_repo_on(host, install_params)
1171
- end
923
+ install_params.delete(:pe_promoted_builds_url) if install_params[:pe_promoted_builds_url].nil?
924
+ install_puppet_agent_pe_promoted_repo_on(host, install_params)
1172
925
  # 1 since no certificate found and waitforcert disabled
1173
926
  acceptable_exit_codes = [0, 1]
1174
927
  acceptable_exit_codes << 2 if opts[:type] == :upgrade
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.19.0'
6
+ STRING = '3.0.0'
7
7
  end
8
8
 
9
9
  end
data/release-prep CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # bundle install
4
- docker run -it --rm \
4
+ docker run -t --rm \
5
5
  -v $(pwd):/app \
6
6
  ruby:2.7-slim-bullseye \
7
7
  /bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends build-essential git make && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
8
8
 
9
9
  # Update Changelog
10
- docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
10
+ docker run -t --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
11
11
  githubchangeloggenerator/github-changelog-generator:1.16.2 \
12
12
  github_changelog_generator --future-release $(grep STRING lib/beaker-pe/version.rb |rev |cut -d "'" -f2 |rev)
@@ -30,14 +30,13 @@ describe ClassMixedWithDSLInstallUtils do
30
30
  let(:basic_hosts) { make_hosts( { :pe_ver => '3.0',
31
31
  :platform => 'linux',
32
32
  :roles => [ 'agent' ],
33
- :type => 'pe'}, 5 ) }
33
+ :type => 'pe'}, 4 ) }
34
34
  let(:hosts) { basic_hosts[0][:roles] = ['master', 'database', 'dashboard']
35
35
  basic_hosts[1][:platform] = 'windows'
36
36
  basic_hosts[2][:platform] = 'osx-10.9-x86_64'
37
37
  basic_hosts[3][:platform] = 'eos'
38
- basic_hosts[4][:platform] = 'sles'
39
38
  basic_hosts }
40
- let(:hosts_sorted) { [ hosts[1], hosts[0], hosts[2], hosts[3], hosts[4] ] }
39
+ let(:hosts_sorted) { [ hosts[1], hosts[0], hosts[2], hosts[3] ] }
41
40
  let(:winhost) { make_host( 'winhost', { :platform => 'windows',
42
41
  :pe_ver => '3.0',
43
42
  :type => 'pe',
@@ -56,10 +55,7 @@ describe ClassMixedWithDSLInstallUtils do
56
55
  :type => 'pe',
57
56
  :working_dir => '/tmp',
58
57
  :dist => 'puppet-enterprise-3.7.1-rc0-78-gffc958f-eos-4-i386' } ) }
59
- let(:sles11host) { make_host( 'sles11', { :platform => 'sles',
60
- :pe_ver => '3.0',
61
- :type => 'pe',
62
- :working_dir => '/tmp'} ) }
58
+
63
59
  let(:lei_hosts) { make_hosts( { :pe_ver => '3.0',
64
60
  :platform => 'linux',
65
61
  :roles => [ 'agent' ],
@@ -1641,30 +1637,8 @@ describe ClassMixedWithDSLInstallUtils do
1641
1637
  subject.do_install([])
1642
1638
  end
1643
1639
 
1644
- context "install rpm file in sles host" do
1645
- let(:opts) {
1646
- { :puppet_collection => 'puppet7' }
1647
- }
1648
- let(:stream) { opts[:puppet_collection] }
1649
- let(:puppet_agent_ver) { '7.29.1.26' }
1650
- let(:agent_downloads_url) { "http://agent-downloads.delivery.puppetlabs.net/puppet-agent" }
1651
- let(:master_version) { '7.29.1.26.gf344eeefa' }
1652
- let(:path) { "#{agent_downloads_url}/#{puppet_agent_ver}/repos/sles/11/#{stream}/x86_64" }
1653
- let(:filename) { "puppet-agent-#{master_version}-1.sles11.x86_64" }
1654
- let(:extension) { '.rpm' }
1655
- let(:url) { "#{path}/#{filename}#{extension}" }
1656
-
1657
- it "generates the correct url to download the package" do
1658
- allow( subject ).to receive( :puppet_fact ).and_return( master_version )
1659
- allow( subject ).to receive( :master ).and_return( {} )
1660
-
1661
- expect( hosts[4] ).to receive( :install_package_with_rpm ).with( url ).once
1662
- subject.install_rpm_on_sles11_host(hosts[4], puppet_agent_ver, opts)
1663
- end
1664
- end
1665
-
1666
1640
  it 'can perform a simple installation' do
1667
- expect(subject).to receive(:get_mco_setting).and_return({}).twice
1641
+ expect(subject).to receive(:get_mco_setting).and_return({})
1668
1642
  allow( subject ).to receive( :verify_network_resources).with(hosts, nil)
1669
1643
  allow( subject ).to receive( :on ).and_return( Beaker::Result.new( {}, '' ) )
1670
1644
  allow( subject ).to receive( :fetch_pe ).and_return( true )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-24 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -165,7 +165,7 @@ dependencies:
165
165
  version: '4.0'
166
166
  - - "<"
167
167
  - !ruby/object:Gem::Version
168
- version: '7'
168
+ version: '6'
169
169
  type: :runtime
170
170
  prerelease: false
171
171
  version_requirements: !ruby/object:Gem::Requirement
@@ -175,7 +175,7 @@ dependencies:
175
175
  version: '4.0'
176
176
  - - "<"
177
177
  - !ruby/object:Gem::Version
178
- version: '7'
178
+ version: '6'
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: beaker-puppet
181
181
  requirement: !ruby/object:Gem::Requirement
@@ -183,6 +183,9 @@ dependencies:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
185
  version: '1'
186
+ - - "<"
187
+ - !ruby/object:Gem::Version
188
+ version: '3'
186
189
  type: :runtime
187
190
  prerelease: false
188
191
  version_requirements: !ruby/object:Gem::Requirement
@@ -190,6 +193,9 @@ dependencies:
190
193
  - - ">="
191
194
  - !ruby/object:Gem::Version
192
195
  version: '1'
196
+ - - "<"
197
+ - !ruby/object:Gem::Version
198
+ version: '3'
193
199
  - !ruby/object:Gem::Dependency
194
200
  name: stringify-hash
195
201
  requirement: !ruby/object:Gem::Requirement
@@ -210,14 +216,14 @@ dependencies:
210
216
  requirements:
211
217
  - - "~>"
212
218
  - !ruby/object:Gem::Version
213
- version: '0.0'
219
+ version: '1.0'
214
220
  type: :runtime
215
221
  prerelease: false
216
222
  version_requirements: !ruby/object:Gem::Requirement
217
223
  requirements:
218
224
  - - "~>"
219
225
  - !ruby/object:Gem::Version
220
- version: '0.0'
226
+ version: '1.0'
221
227
  - !ruby/object:Gem::Dependency
222
228
  name: beaker-abs
223
229
  requirement: !ruby/object:Gem::Requirement
@@ -323,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
329
  - !ruby/object:Gem::Version
324
330
  version: '0'
325
331
  requirements: []
326
- rubygems_version: 3.3.27
332
+ rubygems_version: 3.3.26
327
333
  signing_key:
328
334
  specification_version: 4
329
335
  summary: Beaker PE DSL Helpers!