From ddcd2e5b92df18ab7891ffd18930b3b62f61143f Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Thu, 24 Aug 2023 15:25:09 -0500 Subject: [PATCH 1/2] Update gem dependencies and use Puppet 8 by default (#212) --- CHANGELOG.md | 6 ++++++ Gemfile | 6 +++--- lib/simp/beaker_helpers/constants.rb | 2 +- lib/simp/beaker_helpers/version.rb | 2 +- simp-beaker-helpers.gemspec | 18 +++++++++--------- spec/acceptance/nodesets/amzn2.yml | 16 ++++------------ spec/acceptance/nodesets/default.yml | 10 +++++----- spec/acceptance/nodesets/docker.yml | 13 ++++++------- spec/acceptance/nodesets/oel.yml | 16 ++++------------ spec/acceptance/nodesets/ubuntu.yml | 4 ++-- 10 files changed, 41 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c9a61..a74b00d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 1.32.0 / 2023-08-24 +* Added: + * Switch to Puppet 8 by default +* Fixed: + * Update gem dependencies + ### 1.31.0 / 2023-07-18 * Fixed: * Compatibility with Ruby 3.2 diff --git a/Gemfile b/Gemfile index 5f3a941..530ced7 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem 'bundler' gem 'rake' group :system_tests do - beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '< 5.0.0']) + beaker_gem_options = ENV.fetch('BEAKER_GEM_OPTIONS', ['>= 4.28.1', '< 6.0.0']) if "#{beaker_gem_options}".include?(':') # Just pass in BEAKER_GEM_OPTIONS as a string that would represent the usual @@ -44,8 +44,8 @@ group :system_tests do gem 'beaker-rspec' gem 'beaker-windows' gem 'net-ssh' - gem 'puppet', ENV.fetch('PUPPET_VERSION', '~> 7.0') + gem 'puppet', ENV.fetch('PUPPET_VERSION', ['>= 7.0.0', '< 9.0.0']) gem 'rubocop' gem 'rubocop-rspec' - gem 'puppetlabs_spec_helper', '~> 4.0' + gem 'puppetlabs_spec_helper', '>= 4.0.0', '< 7.0.0' end diff --git a/lib/simp/beaker_helpers/constants.rb b/lib/simp/beaker_helpers/constants.rb index 2282b29..90a4a68 100644 --- a/lib/simp/beaker_helpers/constants.rb +++ b/lib/simp/beaker_helpers/constants.rb @@ -5,7 +5,7 @@ module Simp::BeakerHelpers # # This is done so that we know if some new thing that we're using breaks the # oldest system that we support - DEFAULT_PUPPET_AGENT_VERSION = '~> 7.0' + DEFAULT_PUPPET_AGENT_VERSION = '~> 8.0' SSG_REPO_URL = ENV['BEAKER_ssg_repo'] || 'https://github.com/ComplianceAsCode/content.git' diff --git a/lib/simp/beaker_helpers/version.rb b/lib/simp/beaker_helpers/version.rb index 54c31c8..184e799 100644 --- a/lib/simp/beaker_helpers/version.rb +++ b/lib/simp/beaker_helpers/version.rb @@ -1,5 +1,5 @@ module Simp; end module Simp::BeakerHelpers - VERSION = '1.31.0' + VERSION = '1.32.0' end diff --git a/simp-beaker-helpers.gemspec b/simp-beaker-helpers.gemspec index 41f8549..e477f0a 100644 --- a/simp-beaker-helpers.gemspec +++ b/simp-beaker-helpers.gemspec @@ -16,19 +16,19 @@ Gem::Specification.new do |s| s.email = 'simp@simp-project.org' s.homepage = 'https://github.com/simp/rubygem-simp-beaker-helpers' s.metadata = { - 'issue_tracker' => 'https://simp-project.atlassian.net' + 'issue_tracker' => 'https://github.com/simp/rubygem-simp-beaker-helpers/issues' } s.required_ruby_version = '>= 2.3.0' - s.add_runtime_dependency 'beaker' , ['>= 4.17.0', '< 6.0.0'] - s.add_runtime_dependency 'beaker-rspec' , '~> 8.0' - s.add_runtime_dependency 'beaker-puppet' , ['>= 1.18.14', '< 2.0.0'] - s.add_runtime_dependency 'beaker-docker' , ['>= 0.8.3', '< 2.0.0'] - s.add_runtime_dependency 'docker-api' , ['>= 2.1.0', '< 3.0.0'] - s.add_runtime_dependency 'beaker-vagrant' , ['>= 0.6.4', '< 2.0.0'] - s.add_runtime_dependency 'highline' , '~> 2.0' - s.add_runtime_dependency 'nokogiri' , '~> 1.8' + s.add_runtime_dependency 'beaker', ['>= 4.17.0', '< 6.0.0'] + s.add_runtime_dependency 'beaker-rspec', '~> 8.0' + s.add_runtime_dependency 'beaker-puppet', ['>= 1.18.14', '< 3.0.0'] + s.add_runtime_dependency 'beaker-docker', ['>= 0.8.3', '< 3.0.0'] + s.add_runtime_dependency 'docker-api', ['>= 2.1.0', '< 3.0.0'] + s.add_runtime_dependency 'beaker-vagrant', ['>= 0.6.4', '< 2.0.0'] + s.add_runtime_dependency 'highline', '~> 2.0' + s.add_runtime_dependency 'nokogiri', '~> 1.8' ### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0") s.files = `git ls-files`.split("\n") diff --git a/spec/acceptance/nodesets/amzn2.yml b/spec/acceptance/nodesets/amzn2.yml index 90e0a78..bcd5576 100644 --- a/spec/acceptance/nodesets/amzn2.yml +++ b/spec/acceptance/nodesets/amzn2.yml @@ -1,22 +1,14 @@ -<% - if ENV['BEAKER_HYPERVISOR'] - hypervisor = ENV['BEAKER_HYPERVISOR'] - else - hypervisor = 'vagrant' - end --%> +--- HOSTS: amzn2: roles: - default platform: el-7-x86_64 box: gbailey/amzn2 - hypervisor: <%= hypervisor %> + hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" CONFIG: log_level: verbose - synced_folder : disabled + synced_folder: disabled type: aio -<% if ENV['BEAKER_PUPPET_COLLECTION'] -%> - puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %> -<% end -%> + puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>" diff --git a/spec/acceptance/nodesets/default.yml b/spec/acceptance/nodesets/default.yml index caec0d3..b848bc0 100644 --- a/spec/acceptance/nodesets/default.yml +++ b/spec/acceptance/nodesets/default.yml @@ -2,8 +2,8 @@ HOSTS: el7: roles: - - default - - el7 + - default + - el7 platform: el-7-x86_64 box: centos/7 hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" @@ -11,9 +11,9 @@ HOSTS: gce_machine_type: n1-standard-2 el8: roles: - - el8 + - el8 platform: el-8-x86_64 - box: centos/stream8 + box: generic/centos8s hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" family: centos-cloud/centos-stream-8 gce_machine_type: n1-standard-2 @@ -33,4 +33,4 @@ CONFIG: - <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:encryption].join("\n#{' '*6}- ") %> hmac: - <%= Net::SSH::Transport::Algorithms::ALGORITHMS[:hmac].join("\n#{' '*6}- ") %> - puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>" + puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>" diff --git a/spec/acceptance/nodesets/docker.yml b/spec/acceptance/nodesets/docker.yml index 96de4ad..10567d5 100644 --- a/spec/acceptance/nodesets/docker.yml +++ b/spec/acceptance/nodesets/docker.yml @@ -1,27 +1,26 @@ +--- HOSTS: el7.test.net: roles: - default - el7 - platform: el-7-x86_64 + platform: el-7-x86_64 hypervisor: docker image: simpproject/simp_beaker_el7 - docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log' + docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log" el8.test.net: roles: - el8 - platform: el-8-x86_64 + platform: el-8-x86_64 hypervisor: docker image: simpproject/simp_beaker_el8 - docker_cmd: '/usr/sbin/sshd -D -E /var/log/sshd.log' + docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log" CONFIG: log_level: verbose type: aio -<% if ENV['BEAKER_PUPPET_ENVIRONMENT'] -%> - puppet_environment: <%= ENV['BEAKER_PUPPET_ENVIRONMENT'] %> -<% end -%> + puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>" ssh: password: root auth_methods: diff --git a/spec/acceptance/nodesets/oel.yml b/spec/acceptance/nodesets/oel.yml index 8c9ac24..db941d3 100644 --- a/spec/acceptance/nodesets/oel.yml +++ b/spec/acceptance/nodesets/oel.yml @@ -1,10 +1,4 @@ -<% - if ENV['BEAKER_HYPERVISOR'] - hypervisor = ENV['BEAKER_HYPERVISOR'] - else - hypervisor = 'vagrant' - end --%> +--- HOSTS: oel7: roles: @@ -12,22 +6,20 @@ HOSTS: - el7 platform: el-7-x86_64 box: generic/oracle7 - hypervisor: <%= hypervisor %> + hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" oel8: roles: - el8 platform: el-8-x86_64 box: generic/oracle8 - hypervisor: <%= hypervisor %> + hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" CONFIG: log_level: verbose type: aio vagrant_cpus: 2 -<% if ENV['BEAKER_PUPPET_COLLECTION'] -%> - puppet_collection: <%= ENV['BEAKER_PUPPET_COLLECTION'] %> -<% end -%> + puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>" ssh: keepalive: true keepalive_interval: 10 diff --git a/spec/acceptance/nodesets/ubuntu.yml b/spec/acceptance/nodesets/ubuntu.yml index 1d16621..83a570f 100644 --- a/spec/acceptance/nodesets/ubuntu.yml +++ b/spec/acceptance/nodesets/ubuntu.yml @@ -2,7 +2,7 @@ HOSTS: focal: roles: - - default + - default platform: ubuntu-20.04-x86_64 box: ubuntu/focal64 hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>" @@ -11,4 +11,4 @@ HOSTS: CONFIG: log_level: verbose type: aio - puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet7') %>" + puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'puppet8') %>" From 2633498e85db9138f33268d00ec4dc1034b0c401 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Mon, 28 Aug 2023 11:25:00 -0500 Subject: [PATCH 2/2] Version bump to resolve mis-tagging (#214) --- CHANGELOG.md | 4 ++++ lib/simp/beaker_helpers/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a74b00d..89a53c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.32.1 / 2023-08-28 +* Fixed: + * Version bump to resolve mis-tagging + ### 1.32.0 / 2023-08-24 * Added: * Switch to Puppet 8 by default diff --git a/lib/simp/beaker_helpers/version.rb b/lib/simp/beaker_helpers/version.rb index 184e799..3d45668 100644 --- a/lib/simp/beaker_helpers/version.rb +++ b/lib/simp/beaker_helpers/version.rb @@ -1,5 +1,5 @@ module Simp; end module Simp::BeakerHelpers - VERSION = '1.32.0' + VERSION = '1.32.1' end