From 064185197f632776dd3d501fbc2ac8f1ee7a70c6 Mon Sep 17 00:00:00 2001 From: Manuel Laug Date: Thu, 1 Feb 2024 09:47:13 +0100 Subject: [PATCH 1/4] fix(migration): add missing settings category migration --- ...94513_fix_wreckingball_settings_category_to_dsl.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20240201094513_fix_wreckingball_settings_category_to_dsl.rb diff --git a/db/migrate/20240201094513_fix_wreckingball_settings_category_to_dsl.rb b/db/migrate/20240201094513_fix_wreckingball_settings_category_to_dsl.rb new file mode 100644 index 0000000..91188e5 --- /dev/null +++ b/db/migrate/20240201094513_fix_wreckingball_settings_category_to_dsl.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class FixWreckingballSettingsCategoryToDsl < ActiveRecord::Migration[6.0] + class MigrationSettings < ActiveRecord::Base + self.table_name = :settings + end + + def up + MigrationSettings.where(category: 'Setting::Wreckingball').update_all(category: 'Setting') if column_exists?(:settings, :category) + end +end From 06373961f894b1f51503ab894ddb43f2f56e19d1 Mon Sep 17 00:00:00 2001 From: Manuel Laug Date: Thu, 1 Feb 2024 09:51:29 +0100 Subject: [PATCH 2/4] fix(bundler): pin version to support used ruby version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af2d7a5..09ae6c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: working-directory: foreman run: | echo "gem 'foreman_wreckingball', path: '../foreman_wreckingball'" > bundler.d/foreman_wreckingball.local.rb - gem install bundler + gem install bundler -v 2.4.22 bundle config path vendor/bundle bundle config set without journald development console mysql2 sqlite bundle lock --update From 641d38e9e87bc8b975f3167d2d702043eb20a834 Mon Sep 17 00:00:00 2001 From: Manuel Laug Date: Thu, 1 Feb 2024 12:54:34 +0100 Subject: [PATCH 3/4] fix(tests): Update dependent plugins and add fix for failing minitest --- .github/workflows/ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09ae6c1..bb93ffb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,14 +26,14 @@ jobs: foreman-puppet-version: 3.0.7 foreman-tasks-version: 6.0.3 - foreman-core-branch: 3.3-stable - foreman-puppet-version: 4.0.3 - foreman-tasks-version: 7.0.0 + foreman-puppet-version: 4.0.4 + foreman-tasks-version: 7.2.1 - foreman-core-branch: 3.4-stable - foreman-puppet-version: 4.0.3 - foreman-tasks-version: 7.0.0 + foreman-puppet-version: 4.1.1 + foreman-tasks-version: 7.2.1 - foreman-core-branch: develop - foreman-puppet-version: 4.0.3 - foreman-tasks-version: 7.0.0 + foreman-puppet-version: 6.2.0 + foreman-tasks-version: 9.0.2 steps: - name: Install dependencies run: | @@ -60,6 +60,11 @@ jobs: git cherry-pick -n a439e1e92e9f98f3dbc8ed2f204bd53cc861565e # pin rack-test to < 2.0 (see https://github.com/theforeman/foreman/pull/9288) git cherry-pick -n c3c697fa131aa54c11918bcc563a7789f3c08ef7 # drop rack-test and bump show_me_the_cookies to ~ 6.0 (see https://github.com/theforeman/foreman/pull/9353) working-directory: foreman + - name: Apply patches for Foreman >= 3.2 and <= 3.7 + if: ${{ contains(fromJson('["3.2-stable", "3.3-stable", "3.4-stable", "3.5-stable", "3.6-stable", "3.7-stable"]'), matrix.foreman-core-branch) }} + run: | + git cherry-pick -n 1c3a4155f286352e0abbf0d0b298e47e81c2d6c5 # Pin minitest < 5.19 to resolve test failures (see https://github.com/theforeman/foreman/pull/9781) + working-directory: foreman - name: Setup Ruby uses: ruby/setup-ruby@v1 with: From fe30390b562667f2a49db7d1a7b13b748502caea Mon Sep 17 00:00:00 2001 From: Manuel Laug Date: Fri, 2 Feb 2024 08:58:26 +0100 Subject: [PATCH 4/4] feat(tests): Add foreman >= 3.5 versions to test matrix --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb93ffb..75187d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,17 @@ jobs: strategy: fail-fast: false matrix: - foreman-core-branch: [3.1-stable, 3.2-stable, 3.3-stable, 3.4-stable, develop] + foreman-core-branch: + - 3.1-stable + - 3.2-stable + - 3.3-stable + - 3.4-stable + - 3.5-stable + - 3.6-stable + - 3.7-stable + - 3.8-stable + - 3.9-stable + - develop ruby-version: [2.7] node-version: [14] include: @@ -31,6 +41,21 @@ jobs: - foreman-core-branch: 3.4-stable foreman-puppet-version: 4.1.1 foreman-tasks-version: 7.2.1 + - foreman-core-branch: 3.5-stable + foreman-puppet-version: 5.1.3 + foreman-tasks-version: 7.2.1 + - foreman-core-branch: 3.6-stable + foreman-puppet-version: 5.1.3 + foreman-tasks-version: 7.2.1 + - foreman-core-branch: 3.7-stable + foreman-puppet-version: 6.2.0 + foreman-tasks-version: 8.3.3 + - foreman-core-branch: 3.8-stable + foreman-puppet-version: 6.2.0 + foreman-tasks-version: 8.3.3 + - foreman-core-branch: 3.9-stable + foreman-puppet-version: 6.2.0 + foreman-tasks-version: 9.0.2 - foreman-core-branch: develop foreman-puppet-version: 6.2.0 foreman-tasks-version: 9.0.2 @@ -73,7 +98,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ matrix.node-version }} - name: Add foreman_puppet working-directory: foreman run: echo "gem 'foreman_puppet', '~> ${{ matrix.foreman-puppet-version }}'" > bundler.d/foreman_puppet.local.rb