From cddd931b3d7b9ca9bc3d1862d9805fce6d1abb9f Mon Sep 17 00:00:00 2001 From: Mischa Taylor Date: Thu, 18 May 2023 10:35:15 -0400 Subject: [PATCH] Minimal changes to make upstream GitHub Actions workflows working --- .github/CODEOWNERS | 4 --- .github/workflows/{ci.yml => polymath-ci.yml} | 15 ++++------ .gitignore | 1 + .kitchen.polymath.yml | 29 +++++++++++++++++++ cookbooks/fb_init_sample/recipes/default.rb | 3 +- cookbooks/fb_systemd/recipes/default.rb | 5 +++- 6 files changed, 42 insertions(+), 15 deletions(-) delete mode 100644 .github/CODEOWNERS rename .github/workflows/{ci.yml => polymath-ci.yml} (83%) create mode 100644 .kitchen.polymath.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 29557dd6..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# Make sure PRs get reviewers auto-added. Approve/merging -# won't actually be affected as this repo uses ImportIt and ShipIt -# to do the actual work internally and then have it pushed back to GH -* @jaymzh @NaomiReeves @joshuamiller01 @davide125 diff --git a/.github/workflows/ci.yml b/.github/workflows/polymath-ci.yml similarity index 83% rename from .github/workflows/ci.yml rename to .github/workflows/polymath-ci.yml index a05fd0c3..e5c8a8da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/polymath-ci.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [2.4, 2.5, 2.6] + ruby: [2.4, 2.5] runs-on: ubuntu-latest steps: - name: Checkout repository @@ -30,16 +30,12 @@ jobs: fail-fast: false matrix: os: - - centos-7 - - centos-stream-8 - - ubuntu-1804 - ubuntu-2004 - - debian-9 - - debian-10 + - ubuntu-2204 runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install Chef uses: actionshub/chef-install@1.1.0 with: @@ -52,11 +48,12 @@ jobs: os: ${{ matrix.os }} env: CHEF_LICENSE: accept-no-persist - CHEF_VERSION: 14.15.6 + CHEF_VERSION: 17.10.0 + KITCHEN_YAML: .kitchen.polymath.yml shellcheck: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Shellcheck uses: ludeeus/action-shellcheck@0.3.0 diff --git a/.gitignore b/.gitignore index ba8aef6b..aae6ae4f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Gemfile.lock .kitchen .bundle vendor +.idea/ diff --git a/.kitchen.polymath.yml b/.kitchen.polymath.yml new file mode 100644 index 00000000..b6190134 --- /dev/null +++ b/.kitchen.polymath.yml @@ -0,0 +1,29 @@ +driver: + name: dokken + privileged: true + # our cookbooks should be compatible with the latest Chef, + # but we nee to ensure they still work on 13 until we move to 14 + chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> + +platforms: + - name: ubuntu-20.04 + driver: + image: dokken/ubuntu-20.04 + pid_one_command: /bin/systemd + - name: ubuntu-22.04 + driver: + image: dokken/ubuntu-22.04 + pid_one_command: /bin/systemd + +provisioner: + name: dokken + chef_log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> + +transport: + name: dokken + +suites: + - name: default + run_list: + - recipe[ci_fixes] + - recipe[fb_init_sample] diff --git a/cookbooks/fb_init_sample/recipes/default.rb b/cookbooks/fb_init_sample/recipes/default.rb index d844ebf8..a2c676e8 100644 --- a/cookbooks/fb_init_sample/recipes/default.rb +++ b/cookbooks/fb_init_sample/recipes/default.rb @@ -79,7 +79,8 @@ include_recipe 'fb_hostconf' include_recipe 'fb_sysctl' # HERE: networking -include_recipe 'fb_users' +# MT 2023-05-18 Requires FB::Users::UID_MAP/GID_MAP to be defined +# include_recipe 'fb_users' if node.centos? # We turn this off because the override causes intermittent failures in # Travis when rsyslog is restarted diff --git a/cookbooks/fb_systemd/recipes/default.rb b/cookbooks/fb_systemd/recipes/default.rb index 1b78fe35..329b04fb 100644 --- a/cookbooks/fb_systemd/recipes/default.rb +++ b/cookbooks/fb_systemd/recipes/default.rb @@ -81,7 +81,10 @@ include_recipe 'fb_systemd::journal-remote' include_recipe 'fb_systemd::journal-upload' include_recipe 'fb_systemd::logind' -include_recipe 'fb_systemd::networkd' +# MT 2023-05-18 Don't try to manage networking in a container +unless node.container? + include_recipe 'fb_systemd::networkd' +end include_recipe 'fb_systemd::resolved' include_recipe 'fb_systemd::timesyncd' include_recipe 'fb_systemd::boot'