Why is openssl busted? #9629
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kitchen | |
"on": | |
pull_request: | |
push: | |
branches: | |
- chef-17 | |
jobs: | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022, windows-2019] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Install Chef/Ohai from Omnitruck' | |
id: install_chef | |
run: | | |
. { Invoke-WebRequest -useb https://omnitruck.chef.io/install.ps1 } | Invoke-Expression; Install-Project -project chef -channel current -v 17 | |
$env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH | |
chef-client -v | |
ohai -v | |
rake --version | |
bundle -v | |
- name: 'Upgrade Chef/Ohai via Appbundler' | |
id: upgrade | |
run: | | |
$env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH | |
$env:OHAI_VERSION = ( Select-String -Path .\Gemfile.lock -Pattern '(?<=ohai \()\d.*(?=\))' | ForEach-Object { $_.Matches[0].Value } ) | |
# The chef-client installer does not put the file 'ansidecl.h' down in the correct location | |
# This leads to failures during testing. Moving that file to its correct position here. | |
# Another example of 'bad' that needs to be corrected | |
$output = gci -path C:\opscode\ -file ansidecl.h -Recurse | |
# As of Ruby 3.1, there are 3 ansidecl.h files found in the opscode path | |
# Grabbing the first (and shortest) path found is a bit of a :fingers-crossed: but | |
# making the leap that ansidecl.h isn't going to vary in a way that will fail | |
# subtly. | |
if ($output -is [Array]) { $output = $output[0] } | |
$target_path = $($output.Directory.Parent.FullName + "\x86_64-w64-mingw32\include") | |
# silently continue if the ruby distro has the file there | |
Move-Item -Path $output.FullName -Destination $target_path -ErrorAction SilentlyContinue | |
gem install appbundler appbundle-updater --no-doc | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
appbundle-updater chef chef $env:GITHUB_SHA --tarball --github $env:GITHUB_REPOSITORY | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
Write-Output "Installed Chef / Ohai release:" | |
chef-client -v | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
ohai -v | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
- name: 'Run end_to_end::default recipe' | |
id: run | |
run: | | |
cd kitchen-tests | |
$env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH | |
# htmldiff and ldiff on windows cause a conflict with gems being loaded below. | |
# we remove thenm here. | |
if (Test-Path C:\opscode\chef\embedded\bin\htmldiff) | |
{ | |
Remove-Item -Path C:\opscode\chef\embedded\bin\htmldiff | |
Remove-Item -Path C:\opscode\chef\embedded\bin\ldiff | |
} | |
# if a different version of ffi-yajl is installed, then libyajl2 needs to be reinstalled | |
# so that libyajldll.a is present in the intermediate build step. bundler seems to skip | |
# libyajl2 build if already present. gem install seems to build anyway. | |
gem uninstall -I libyajl2 | |
bundle install --jobs=3 --retry=3 | |
# If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
# The bundle install command above fails because our build on windows on ruby-3.0 is | |
# completely broken when it comes to installing native gems. Until that is fixed we | |
# need to ignore that error code and to manually install berkshelf below. This is a | |
# very bad hack. | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
gem install berkshelf --no-doc | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
berks vendor cookbooks | |
If ($lastexitcode -ne 0) { Exit $lastexitcode } | |
chef-client -z -o end_to_end --chef-license accept-no-persist | |
macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Install Chef/Ohai from Omnitruck' | |
id: install_chef | |
run: | | |
brew install coreutils | |
curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -c current -v 17 | |
/opt/chef/bin/chef-client -v | |
/opt/chef/bin/ohai -v | |
/opt/chef/embedded/bin/rake --version | |
- name: 'Upgrade Chef/Ohai via Appbundler' | |
id: upgrade | |
run: | | |
OHAI_VERSION=$(sed -n '/ohai .[0-9]/{s/.*(//;s/)//;p;}' Gemfile.lock) | |
sudo /opt/chef/embedded/bin/gem install appbundler appbundle-updater --no-doc | |
sudo /opt/chef/embedded/bin/appbundle-updater chef chef $GITHUB_SHA --tarball --github $GITHUB_REPOSITORY | |
echo "Installed Chef / Ohai release:" | |
/opt/chef/bin/chef-client -v | |
/opt/chef/bin/ohai -v | |
- name: 'Run end_to_end::default recipe' | |
id: run | |
run: | | |
cd kitchen-tests | |
sudo /opt/chef/embedded/bin/bundle config set --local without 'omnibus_package' | |
sudo /opt/chef/embedded/bin/bundle config set --local path 'vendor/bundle' | |
sudo /opt/chef/embedded/bin/bundle install --jobs=3 --retry=3 | |
sudo rm -f /opt/chef/embedded/bin/{htmldiff,ldiff} | |
sudo /opt/chef/embedded/bin/gem install berkshelf --no-doc | |
sudo /opt/chef/embedded/bin/berks vendor cookbooks | |
sudo /opt/chef/bin/chef-client -z -o end_to_end --chef-license accept-no-persist | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'centos-6' | |
- 'centos-7' | |
- 'centos-8' | |
- 'debian-10' | |
- 'debian-11' | |
- 'fedora-latest' | |
- 'opensuse-leap-15' | |
- 'oraclelinux-8' | |
- 'ubuntu-1804' | |
- 'ubuntu-2004' | |
- 'ubuntu-2204' | |
runs-on: ubuntu-latest | |
env: | |
FORCE_FFI_YAJL: ext | |
CHEF_LICENSE: accept-no-persist | |
steps: | |
- name: Check out code | |
uses: actions/checkout@main | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
bundler-cache: true | |
working-directory: kitchen-tests | |
- name: Run Test Kitchen | |
working-directory: kitchen-tests | |
run: | | |
bundle exec kitchen test end-to-end-${{ matrix.os }} | |
# Amazon Linux 2 and Oracle Linux 7 dokken images have systemctl issues | |
# on Ubuntu 22.04 host platforms and later. Pin these to Ubuntu 20.04 | |
linux-2004-host: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'amazonlinux-2' | |
- 'oraclelinux-7' | |
runs-on: ubuntu-20.04 | |
env: | |
FORCE_FFI_YAJL: ext | |
CHEF_LICENSE: accept-no-persist | |
steps: | |
- name: Check out code | |
uses: actions/checkout@main | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
bundler-cache: true | |
working-directory: kitchen-tests | |
- name: Run Test Kitchen | |
working-directory: kitchen-tests | |
run: | | |
bundle exec kitchen test end-to-end-${{ matrix.os }} |