summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/kitchen.yml47
1 files changed, 27 insertions, 20 deletions
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml
index 7296703467..7844ebe111 100644
--- a/.github/workflows/kitchen.yml
+++ b/.github/workflows/kitchen.yml
@@ -71,28 +71,35 @@ jobs:
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 } )
+ - 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] }
- # # 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
- # $target_path = $($output.Directory.Parent.FullName + "\x86_64-w64-mingw32\include")
- # Move-Item -Path $output.FullName -Destination $target_path
+ $target_path = $($output.Directory.Parent.FullName + "\x86_64-w64-mingw32\include")
+ Move-Item -Path $output.FullName -Destination $target_path
- # 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 }
+ 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: |