summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-03-23 13:35:16 -0700
committerJohn McCrae <john.mccrae@progress.com>2022-03-23 13:35:16 -0700
commit44a70b9a6d518801a49e8ed437de10f32e3d8e33 (patch)
tree91a59a518b15981fc91fe66e16448f88278dbbf6
parentaaeb0e79daa1a735de2f696e5e172abe7b99e389 (diff)
downloadchef-44a70b9a6d518801a49e8ed437de10f32e3d8e33.tar.gz
updating .github/workflows/kitchen.yml to overcome chef installer errors
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r--.github/workflows/kitchen.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml
index 2266fc5cad..e8051e79cd 100644
--- a/.github/workflows/kitchen.yml
+++ b/.github/workflows/kitchen.yml
@@ -44,12 +44,26 @@ jobs:
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
+ }
+ # 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
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