From 465901624fde27187fe872298c85610ad1916ea1 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:46:11 +0100 Subject: [PATCH 1/8] (CAT-2381) Puppetcore update A set of changes dedicated to implementing puppetcore into our modules. This update, amongst other changes, removes Puppet 7 support. --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index b1aac9944..cf3ace358 100644 --- a/metadata.json +++ b/metadata.json @@ -80,7 +80,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 7.0.0 < 9.0.0" + "version_requirement": ">= 8.0.0 < 9.0.0" } ], "description": "MySQL module", From 35395be0928c0664bd66f9b6784d9a78b64ec77a Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:47:39 +0100 Subject: [PATCH 2/8] PDK update --- .puppet-lint.rc | 8 +++++ .rubocop.yml | 3 +- Gemfile | 89 +++++++++++++++++++++++++++++++------------------ Rakefile | 9 +++++ metadata.json | 4 +-- 5 files changed, 76 insertions(+), 37 deletions(-) diff --git a/.puppet-lint.rc b/.puppet-lint.rc index f01626d45..3cad461e9 100644 --- a/.puppet-lint.rc +++ b/.puppet-lint.rc @@ -1,3 +1,11 @@ +--fail-on-warnings --relative +--no-80chars-check +--no-140chars-check +--no-class_inherits_from_params_class-check +--no-autoloader_layout-check +--no-documentation-check +--no-single_quote_string_with_variables-check --no-anchor_resource-check --no-params_empty_string_assignment-check +--ignore-paths=.vendor/**/*.pp,.bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp,tests/**/*.pp,types/**/*.pp,vendor/**/*.pp diff --git a/.rubocop.yml b/.rubocop.yml index 1b2b97111..900aa6371 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,12 +1,11 @@ --- -inherit_from: .rubocop_todo.yml require: - rubocop-performance - rubocop-rspec AllCops: NewCops: enable DisplayCopNames: true - TargetRubyVersion: '2.6' + TargetRubyVersion: 3.1 Include: - "**/*.rb" Exclude: diff --git a/Gemfile b/Gemfile index 2d8e1608b..4e7de031f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,65 +1,86 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' +# frozen_string_literal: true -def location_for(place_or_version, fake_version = nil) - git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?} - file_url_regex = %r{\Afile:\/\/(?.*)} +# For puppetcore, set GEM_SOURCE_PUPPETCORE = 'https://rubygems-puppetcore.puppet.com' +gemsource_default = ENV['GEM_SOURCE'] || 'https://rubygems.org' +gemsource_puppetcore = if ENV['PUPPET_FORGE_TOKEN'] + 'https://rubygems-puppetcore.puppet.com' +else + ENV['GEM_SOURCE_PUPPETCORE'] || gemsource_default +end +source gemsource_default + +def location_for(place_or_constraint, fake_constraint = nil, opts = {}) + git_url_regex = /\A(?(?:https?|git)[:@][^#]*)(?:#(?.*))?/ + file_url_regex = %r{\Afile://(?.*)} + + if place_or_constraint && (git_url = place_or_constraint.match(git_url_regex)) + # Git source → ignore :source, keep fake_constraint + [fake_constraint, { git: git_url[:url], branch: git_url[:branch], require: false }].compact + + elsif place_or_constraint && (file_url = place_or_constraint.match(file_url_regex)) + # File source → ignore :source, keep fake_constraint or default >= 0 + [fake_constraint || '>= 0', { path: File.expand_path(file_url[:path]), require: false }] - if place_or_version && (git_url = place_or_version.match(git_url_regex)) - [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact - elsif place_or_version && (file_url = place_or_version.match(file_url_regex)) - ['>= 0', { path: File.expand_path(file_url[:path]), require: false }] else - [place_or_version, { require: false }] + # Plain version constraint → merge opts (including :source if provided) + [place_or_constraint, { require: false }.merge(opts)] + end +end + +# Print debug information if DEBUG_GEMS or VERBOSE is set +def print_gem_statement_for(gems) + puts 'DEBUG: Gem definitions that will be generated:' + gems.each do |gem_name, gem_params| + puts "DEBUG: gem #{([gem_name.inspect] + gem_params.map(&:inspect)).join(', ')}" end end group :development do - gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "deep_merge", '~> 1.2.2', require: false gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false - gem "facterdb", '~> 2.1', require: false + gem "facterdb", '~> 2.1', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "facterdb", '~> 3.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "metadata-json-lint", '~> 4.0', require: false - gem "rspec-puppet-facts", '~> 4.0', require: false + gem "json-schema", '< 5.1.1', require: false + gem "rspec-puppet-facts", '~> 4.0', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "rspec-puppet-facts", '~> 5.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) gem "dependency_checker", '~> 1.0.0', require: false gem "parallel_tests", '= 3.12.1', require: false gem "pry", '~> 0.10', require: false gem "simplecov-console", '~> 0.9', require: false - gem "puppet-debugger", '~> 1.0', require: false + gem "puppet-debugger", '~> 1.6', require: false gem "rubocop", '~> 1.50.0', require: false gem "rubocop-performance", '= 1.16.0', require: false gem "rubocop-rspec", '= 2.19.0', require: false gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "rexml", '>= 3.3.9', require: false + gem "bigdecimal", '< 3.2.2', require: false, platforms: [:mswin, :mingw, :x64_mingw] end group :development, :release_prep do gem "puppet-strings", '~> 4.0', require: false - gem "puppetlabs_spec_helper", '~> 7.0', require: false + gem "puppetlabs_spec_helper", '~> 8.0', require: false + gem "puppet-blacksmith", '~> 7.0', require: false end group :system_tests do - gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] + gem "puppet_litmus", '~> 2.0', require: false, platforms: [:ruby, :x64_mingw] if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty? + gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] if ENV['PUPPET_FORGE_TOKEN'].to_s.empty? gem "CFPropertyList", '< 3.0.7', require: false, platforms: [:mswin, :mingw, :x64_mingw] gem "serverspec", '~> 2.41', require: false end -puppet_version = ENV['PUPPET_GEM_VERSION'] -facter_version = ENV['FACTER_GEM_VERSION'] -hiera_version = ENV['HIERA_GEM_VERSION'] - gems = {} +puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil) +facter_version = ENV.fetch('FACTER_GEM_VERSION', nil) +hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil) -gems['puppet'] = location_for(puppet_version) - -# If facter or hiera versions have been specified via the environment -# variables - -gems['facter'] = location_for(facter_version) if facter_version -gems['hiera'] = location_for(hiera_version) if hiera_version +gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore }) +gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore }) +gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version +# Generate the gem definitions +print_gem_statement_for(gems) if ENV['DEBUG'] gems.each do |gem_name, gem_params| gem gem_name, *gem_params end @@ -67,12 +88,14 @@ end # Evaluate Gemfile.local and ~/.gemfile if they exist extra_gemfiles = [ "#{__FILE__}.local", - File.join(Dir.home, '.gemfile'), + File.join(Dir.home, '.gemfile') ] extra_gemfiles.each do |gemfile| - if File.file?(gemfile) && File.readable?(gemfile) - eval(File.read(gemfile), binding) - end + next unless File.file?(gemfile) && File.readable?(gemfile) + + # rubocop:disable Security/Eval + eval(File.read(gemfile), binding) + # rubocop:enable Security/Eval end # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 32f4fa9e1..42efa72f5 100644 --- a/Rakefile +++ b/Rakefile @@ -7,5 +7,14 @@ require 'puppet-syntax/tasks/puppet-syntax' require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' PuppetLint.configuration.send('disable_relative') +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_140chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_autoloader_layout') +PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_single_quote_string_with_variables') PuppetLint.configuration.send('disable_anchor_resource') PuppetLint.configuration.send('disable_params_empty_string_assignment') +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.ignore_paths = [".vendor/**/*.pp", ".bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp", "tests/**/*.pp", "types/**/*.pp", "vendor/**/*.pp"] + diff --git a/metadata.json b/metadata.json index cf3ace358..0ccc72118 100644 --- a/metadata.json +++ b/metadata.json @@ -85,6 +85,6 @@ ], "description": "MySQL module", "template-url": "https://github.com/puppetlabs/pdk-templates#main", - "template-ref": "tags/3.2.0.4-0-g5d17ec1", - "pdk-version": "3.2.0" + "template-ref": "heads/main-0-g19976cd", + "pdk-version": "3.5.0" } From 3fa9897e32f0a4e8d33c724f3bbb94e15a7b594e Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:51:15 +0100 Subject: [PATCH 3/8] Rubocop safe autocorrections --- lib/puppet/provider/mysql.rb | 2 +- lib/puppet/provider/mysql_database/mysql.rb | 2 +- lib/puppet/provider/mysql_grant/mysql.rb | 4 ++-- lib/puppet/provider/mysql_login_path/inifile.rb | 2 +- lib/puppet/provider/mysql_login_path/mysql_login_path.rb | 4 ++-- lib/puppet/provider/mysql_plugin/mysql.rb | 2 +- lib/puppet/provider/mysql_user/mysql.rb | 2 +- tasks/export.rb | 2 +- tasks/sql.rb | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index e539d9b9c..55e088df2 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -141,7 +141,7 @@ def self.mysql_caller(text_of_sql, type) mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact).scrub end else - raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: type }) + raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: }) end end diff --git a/lib/puppet/provider/mysql_database/mysql.rb b/lib/puppet/provider/mysql_database/mysql.rb index 04d95bf76..2b2f1a925 100644 --- a/lib/puppet/provider/mysql_database/mysql.rb +++ b/lib/puppet/provider/mysql_database/mysql.rb @@ -13,7 +13,7 @@ def self.instances k, v = line.split(%r{\s}) attributes[k] = v end - new(name: name, + new(name:, ensure: :present, charset: attributes['character_set_database'], collate: attributes['collation_database']) diff --git a/lib/puppet/provider/mysql_grant/mysql.rb b/lib/puppet/provider/mysql_grant/mysql.rb index 20af17151..9413f0a09 100644 --- a/lib/puppet/provider/mysql_grant/mysql.rb +++ b/lib/puppet/provider/mysql_grant/mysql.rb @@ -99,7 +99,7 @@ def self.instances instance_configs[name] = { privileges: sorted_privileges, - table: table, + table:, user: "#{user}@#{host}", options: options.uniq } @@ -108,7 +108,7 @@ def self.instances instances = [] instance_configs.map do |name, config| instances << new( - name: name, + name:, ensure: :present, privileges: config[:privileges], table: config[:table], diff --git a/lib/puppet/provider/mysql_login_path/inifile.rb b/lib/puppet/provider/mysql_login_path/inifile.rb index 98d23f04e..e0bddfb2f 100644 --- a/lib/puppet/provider/mysql_login_path/inifile.rb +++ b/lib/puppet/provider/mysql_login_path/inifile.rb @@ -30,7 +30,7 @@ class Error < StandardError; end def self.load(filename, opts = {}) return unless File.file? filename - new(opts.merge(filename: filename)) + new(opts.merge(filename:)) end # Get and set the filename diff --git a/lib/puppet/provider/mysql_login_path/mysql_login_path.rb b/lib/puppet/provider/mysql_login_path/mysql_login_path.rb index 76ac829c6..52cf79e58 100644 --- a/lib/puppet/provider/mysql_login_path/mysql_login_path.rb +++ b/lib/puppet/provider/mysql_login_path/mysql_login_path.rb @@ -59,7 +59,7 @@ def mysql_config_editor_cmd(context, uid, *args) Puppet::Util::Execution.execute( args, failonfail: true, - uid: uid, + uid:, custom_environment: { 'HOME' => homedir }, ) end @@ -70,7 +70,7 @@ def my_print_defaults_cmd(context, uid, *args) Puppet::Util::Execution.execute( args, failonfail: true, - uid: uid, + uid:, custom_environment: { 'HOME' => homedir }, ) end diff --git a/lib/puppet/provider/mysql_plugin/mysql.rb b/lib/puppet/provider/mysql_plugin/mysql.rb index 82db9f941..3e3d500c0 100644 --- a/lib/puppet/provider/mysql_plugin/mysql.rb +++ b/lib/puppet/provider/mysql_plugin/mysql.rb @@ -9,7 +9,7 @@ def self.instances mysql_caller('show plugins', 'regular').split("\n").map do |line| name, _status, _type, library, _license = line.split(%r{\t}) - new(name: name, + new(name:, ensure: :present, soname: library) end diff --git a/lib/puppet/provider/mysql_user/mysql.rb b/lib/puppet/provider/mysql_user/mysql.rb index b552a5620..7ab636bd8 100644 --- a/lib/puppet/provider/mysql_user/mysql.rb +++ b/lib/puppet/provider/mysql_user/mysql.rb @@ -34,7 +34,7 @@ def self.instances # https://jira.mariadb.org/browse/MDEV-16238 https://jira.mariadb.org/browse/MDEV-16774 @password = @authentication_string end - new(name: name, + new(name:, ensure: :present, password_hash: @password, plugin: @plugin, diff --git a/tasks/export.rb b/tasks/export.rb index 7688633ae..0abf6ce2b 100755 --- a/tasks/export.rb +++ b/tasks/export.rb @@ -12,7 +12,7 @@ def get(file, database, user, password) cmd_string << " --password=#{password}" unless password.nil? cmd_string << " > #{file}" unless file.nil? stdout, stderr, status = Open3.capture3(cmd_string) - raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0 + raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: }) if status != 0 { status: stdout.strip } end diff --git a/tasks/sql.rb b/tasks/sql.rb index aeeec5bea..5b7a317ee 100755 --- a/tasks/sql.rb +++ b/tasks/sql.rb @@ -11,7 +11,7 @@ def get(sql, database, user, password) cmd << "--user=#{user}" unless user.nil? cmd << "--password=#{password}" unless password.nil? stdout, stderr, status = Open3.capture3(*cmd) - raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0 + raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: }) if status != 0 { status: stdout.strip } end From 543491241d0f0609144bbd39accaeb73ef598ac0 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:52:42 +0100 Subject: [PATCH 4/8] Remove outdated pin --- .fixtures.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.fixtures.yml b/.fixtures.yml index 5c67151b0..e1bb5609a 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -6,4 +6,3 @@ fixtures: "provision": "https://github.com/puppetlabs/provision.git" puppet_agent: repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git' - ref: v4.21.0 From a184b3ff32758533c4b218f3a8b3f8a19cd90671 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:55:06 +0100 Subject: [PATCH 5/8] Update outdated workflows --- .github/workflows/ci.yml | 99 ++--------------------------------- .github/workflows/nightly.yml | 99 ++--------------------------------- 2 files changed, 10 insertions(+), 188 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1967b8505..97811fe96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,100 +9,11 @@ on: jobs: Spec: uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" - with: - runs_on: "ubuntu-24.04" secrets: "inherit" - setup_matrix: - name: "Setup Test Matrix" - needs: "Spec" - runs-on: ubuntu-24.04 - outputs: - matrix: ${{ steps.get-matrix.outputs.matrix }} - - steps: - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Activate Ruby 3.1 - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - - name: Print bundle environment - run: | - echo ::group::bundler environment - bundle env - echo ::endgroup:: - - - name: Setup Acceptance Test Matrix - id: get-matrix - run: | - bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]' - Acceptance: - name: "${{matrix.platforms.label}}, ${{matrix.collection}}" - needs: - - setup_matrix - if: ${{ needs.setup_matrix.outputs.matrix != '{}' }} - - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}} - - env: - PUPPET_GEM_VERSION: '~> 7.24' - FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' - - steps: - - name: "Install Twingate" - uses: "twingate/github-action@v1" - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Activate Ruby 3.1 - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - - name: Print bundle environment - run: | - bundle env - - - name: "Disable mysqld apparmor profile" - if: ${{matrix.platforms.provider == 'docker'}} - run: | - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld - sudo systemctl disable apparmor - sudo systemctl stop apparmor - - - name: Provision test environment - run: | - bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]' - FILE='spec/fixtures/litmus_inventory.yaml' - sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true - - - name: Install agent - run: | - bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' - - - name: Install module - run: | - bundle exec rake 'litmus:install_module' - - - name: Run acceptance tests - run: | - bundle exec rake 'litmus:acceptance:parallel' - - - name: Remove test environment - if: ${{ always() }} - continue-on-error: true - run: | - bundle exec rake 'litmus:tear_down' + needs: Spec + uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" + with: + flags: "--latest-agent" + secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index eeb047a2b..bdeafb83d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,100 +8,11 @@ on: jobs: Spec: uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" - with: - runs_on: "ubuntu-24.04" secrets: "inherit" - setup_matrix: - name: "Setup Test Matrix" - needs: "Spec" - runs-on: ubuntu-24.04 - outputs: - matrix: ${{ steps.get-matrix.outputs.matrix }} - - steps: - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Activate Ruby 3.1 - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - - name: Print bundle environment - run: | - echo ::group::bundler environment - bundle env - echo ::endgroup:: - - - name: Setup Acceptance Test Matrix - id: get-matrix - run: | - bundle exec matrix_from_metadata_v2 --exclude-platforms '["Debian-12-arm", "Ubuntu-22.04-arm", "RedHat-9-arm"]' - Acceptance: - name: "${{matrix.platforms.label}}, ${{matrix.collection}}" - needs: - - setup_matrix - if: ${{ needs.setup_matrix.outputs.matrix != '{}' }} - - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}} - - env: - PUPPET_GEM_VERSION: '~> 7.24' - FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main' - - steps: - - name: "Install Twingate" - uses: "twingate/github-action@v1" - with: - service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} - - - name: Checkout Source - uses: actions/checkout@v3 - - - name: Activate Ruby 3.1 - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - - name: Print bundle environment - run: | - bundle env - - - name: "Disable mysqld apparmor profile" - if: ${{matrix.platforms.provider == 'docker'}} - run: | - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld - sudo systemctl disable apparmor - sudo systemctl stop apparmor - - - name: Provision test environment - run: | - bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]' - FILE='spec/fixtures/litmus_inventory.yaml' - sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true - - - name: Install agent - run: | - bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]' - - - name: Install module - run: | - bundle exec rake 'litmus:install_module' - - - name: Run acceptance tests - run: | - bundle exec rake 'litmus:acceptance:parallel' - - - name: Remove test environment - if: ${{ always() }} - continue-on-error: true - run: | - bundle exec rake 'litmus:tear_down' + needs: Spec + uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" + with: + flags: "--latest-agent" + secrets: "inherit" From a7ab054f598aa30517962e457266eedd43b36d4c Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 15:59:36 +0100 Subject: [PATCH 6/8] Inherit rubocop_todo --- .rubocop.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 900aa6371..32bb411b4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,6 @@ --- +inherit_from: .rubocop_todo.yml + require: - rubocop-performance - rubocop-rspec From 58bc8e241bdde52025d4cd913367ed8cc5dcc072 Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Mon, 22 Sep 2025 16:20:52 +0100 Subject: [PATCH 7/8] Exclude unsupported systems --- .github/workflows/ci.yml | 2 +- .github/workflows/nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97811fe96..637571ba5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--latest-agent" + flags: "--latest-agent --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index bdeafb83d..14f6b9bab 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,5 +14,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--latest-agent" + flags: "--latest-agent --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" secrets: "inherit" From b39f7ef69e22c9ec18c34e847fae3d0c643dc12b Mon Sep 17 00:00:00 2001 From: Lukas Audzevicius Date: Tue, 23 Sep 2025 08:30:06 +0100 Subject: [PATCH 8/8] Test against nightlies --- .github/workflows/ci.yml | 2 +- .github/workflows/nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 637571ba5..0869acd89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--latest-agent --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" + flags: "--nightly --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 14f6b9bab..57796442c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,5 +14,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--latest-agent --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" + flags: "--nightly --platform-exclude centos-7 --platform-exclude scientific-7 --platform-exclude oraclelinux-7 --platform-exclude almalinux-8 --arch-exclude arm" secrets: "inherit"