beaker-pe 2.11.13 → 2.11.14

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: 278ceb769e990a1ceb6fc3a83f4869ce7913190123332936ef36fadddc17172d
4
- data.tar.gz: 2a746b54a02eea0e43d693a99c75b6718cdd81b7142bd0148fcfa3ca12bbf1ff
3
+ metadata.gz: 8e9b569e250c94eb451c24254d071bb6fef6894f8a88c2935ce971fff81fe67b
4
+ data.tar.gz: abcf48ef49c6ce13258c4228ffc01ec4b53edac71a05617f5e35da6f0c3d28fe
5
5
  SHA512:
6
- metadata.gz: 8d3ee52a7aac5657a1bed7a1fb8483f5580a220dc4b2f4cd49a9a5dbed49845b16b18924534eed741d560f49131988a953c63111d9588c30aa547d15ee4e7ed8
7
- data.tar.gz: ebbb6347e0403eb5bcf86725b8b2ed34aa8b7b8fa94d87630fff27a10e8e312ea42139be4fff85edbecc6a96b33de9401ce9f56de9a5d0d15acaad74c759897e
6
+ metadata.gz: edd113d5a18fadcba0f7eb2a9e01bd4bd3335973cc2eca1a649e32cf52e1e7936c76430d8b5b27dda0b1ab2d0122d4d97baa4ed1869f902515e4e9f68b07f433
7
+ data.tar.gz: 7074073427dc6118f5e706eaf600dc8d72b15b8488cb12cc8515e4f52da20a1431fc7b8e7b314e2015e286c7c3d867ea28b7b25e2a3c8de3a25833b9945a7412
@@ -368,9 +368,11 @@ module Beaker
368
368
  scp_to host, "#{path}/#{filename}#{extension}", "#{host['working_dir']}/#{filename}#{extension}"
369
369
  if extension =~ /gz/
370
370
  on host, "cd #{host['working_dir']}; gunzip #{filename}#{extension}"
371
+ gpg_key_overwrite(host, 'tarball')
371
372
  end
372
373
  if extension =~ /tar/
373
374
  on host, "cd #{host['working_dir']}; tar -xvf #{filename}.tar"
375
+ gpg_key_overwrite(host, 'tarball')
374
376
  end
375
377
  else
376
378
  if host['platform'] =~ /eos/
@@ -395,7 +397,37 @@ module Beaker
395
397
  command_file_push = "curl -L #{curlopts}#{path}/"
396
398
  end
397
399
  on host, "cd #{host['working_dir']}; #{command_file_push}#{filename}#{extension} | #{unpack}"
400
+ gpg_key_overwrite(host, 'tarball')
401
+ end
402
+ end
403
+ end
404
+
405
+ #PE-32680, GPG expired on older PE versions, need to update with a new GPG key on the primary server
406
+ #only affects PE versions 2019.8.4 and earlier, and only needed for debian, ubuntu, and sles agent platforms
407
+ # @param [Host] host to see if we need to update the gpg key
408
+ # @param [String] location of the GPG key we intend to overwrite
409
+ # If someone is using this gem and is not on the PE private network, they need to download the new private GPG key and host
410
+ # it somewhere, then set the URL as an enviromental variable GPG_URL.
411
+ def gpg_key_overwrite(host, location)
412
+ gpg_url = ENV['GPG_URL'] || 'https://artifactory.delivery.puppetlabs.net/artifactory/generic__local/extended_gpg_key.asc'
413
+ case location
414
+ when 'tarball'
415
+ path_to_gpg_key = "#{host['working_dir']}/#{host['dist']}/packages/GPG-KEY-puppet"
416
+ when 'pe_repo'
417
+ path_to_gpg_key = '/opt/puppetlabs/puppet/modules/pe_repo/files/GPG-KEY-puppet'
418
+ when 'pe_repo_env'
419
+ path_to_gpg_key = '/opt/puppetlabs/server/data/environments/enterprise/modules/pe_repo/files/GPG-KEY-puppet'
420
+ else
421
+ raise(StandardError, "gpg_key_overwrite requires a valid location: tarball, or pe_repo. #{location} was supplied")
422
+ end
398
423
 
424
+ if (host['roles'].include?('master') || host['roles'].include?('pe_postgres')) && version_is_less(host[:pe_ver], '2019.8.5') && hosts.any? {|agent| agent['platform'] =~ /(debian)|(ubuntu)|(sles)/}
425
+ on(master, "rm -f #{path_to_gpg_key}")
426
+ on(master, "curl #{gpg_url} --output #{path_to_gpg_key}")
427
+ if location == 'pe_repo'
428
+ gpg_key_overwrite(host, 'pe_repo_env')
429
+ elsif location == 'pe_repo_env'
430
+ on master, puppet('agent -t'), :acceptable_exit_codes => [0,2]
399
431
  end
400
432
  end
401
433
  end
@@ -439,7 +471,6 @@ module Beaker
439
471
  # For some platforms (e.g, redhatfips), packaging_platfrom is set and should
440
472
  # be used as the primary source of truth for the platform string.
441
473
  platform = host['packaging_platform'] || host['platform']
442
-
443
474
  # We don't have a separate AIX 7.2 build, so it is
444
475
  # classified as 7.1 for pe_repo purposes
445
476
  if platform == "aix-7.2-power"
@@ -1998,6 +2029,8 @@ module Beaker
1998
2029
  end
1999
2030
  end
2000
2031
 
2032
+ gpg_key_overwrite(master, 'pe_repo')
2033
+
2001
2034
  step "Install agents" do
2002
2035
  block_on(agent_nodes, {:run_in_parallel => true}) do |host|
2003
2036
  install_ca_cert_on(host, opts)
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.11.13'
6
+ STRING = '2.11.14'
7
7
  end
8
8
 
9
9
  end
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.11.13
4
+ version: 2.11.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-16 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec