diff options
author | Tim Smith <tsmith@chef.io> | 2021-04-22 17:49:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 17:49:41 -0700 |
commit | 87924101e28bd5b4d16f0c6e2d7b883d594108f7 (patch) | |
tree | 4b09e3a3a6a913cfcb3ad36472b6caa9c6ed00c0 | |
parent | e66ea77e7d3337f7479052b3b256999b9e4bf3cc (diff) | |
parent | 1f89b3a03a41f914fd8c8549be3a8568d64844b9 (diff) | |
download | chef-87924101e28bd5b4d16f0c6e2d7b883d594108f7.tar.gz |
Merge pull request #11438 from chef/more_actions
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | .github/workflows/kitchen.yml | 53 | ||||
-rw-r--r-- | azure-pipelines.yml | 42 |
2 files changed, 53 insertions, 42 deletions
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml new file mode 100644 index 0000000000..df7fd3e1b0 --- /dev/null +++ b/.github/workflows/kitchen.yml @@ -0,0 +1,53 @@ +--- +name: kitchen + +"on": + pull_request: + push: + branches: + - master + +jobs: + windows: + strategy: + fail-fast: false + matrix: + os: [windows-2019, windows-2016] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - 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 + $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 } ) + gem install appbundler appbundle-updater --no-doc + appbundle-updater chef chef $env:BUILD_SOURCEVERSION --tarball --github chef/chef + Write-Output "Installed Chef / Ohai release:" + chef-client -v + ohai -v + - 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 + bundle config set without 'omnibus_package ruby_prof' + bundle install --jobs=3 --retry=3 --path=vendor/bundle + gem install berkshelf --no-doc + # berks emits a ruby warning when it loads net/http due to a previously + # defined constant. Even though it is just a warning, powershell immediately + # exits 1. I'm not sure why but this just suppresses the warnings. + $env:RUBYOPT="-W0" + berks vendor cookbooks + # restore the default warning level + $env:RUBYOPT="-W1" + chef-client -z -o end_to_end --chef-license accept-no-persist diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b2f3acbf8c..ffa1612b6f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,45 +49,3 @@ jobs: sudo /opt/chef/embedded/bin/berks vendor cookbooks sudo /opt/chef/bin/chef-client -z -o end_to_end --chef-license accept-no-persist displayName: 'Run end_to_end::default recipe' - - - job: - strategy: - matrix: - windows_kitchen_tests: - imageName: 'windows-latest' - - steps: - - powershell: | - . { Invoke-WebRequest -useb https://omnitruck.chef.io/install.ps1 } | Invoke-Expression; Install-Project -project chef -channel current - $env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH - chef-client -v - ohai -v - rake --version - bundle -v - displayName: 'Install Chef/Ohai from Omnitruck' - - - powershell: | - $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 } ) - gem install appbundler appbundle-updater --no-doc - appbundle-updater chef chef $env:BUILD_SOURCEVERSION --tarball --github chef/chef - Write-Output "Installed Chef / Ohai release:" - chef-client -v - ohai -v - displayName: 'Upgrade Chef/Ohai via Appbundler' - - - powershell: | - cd kitchen-tests - $env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH - bundle config set without 'omnibus_package ruby_prof' - bundle install --jobs=3 --retry=3 --path=vendor/bundle - gem install berkshelf --no-doc - # berks emits a ruby warning when it loads net/http due to a previously - # defined constant. Even though it is just a warning, powershell immediately - # exits 1. I'm not sure why but this just suppresses the warnings. - $env:RUBYOPT="-W0" - berks vendor cookbooks - # restore the default warning level - $env:RUBYOPT="-W1" - chef-client -z -o end_to_end --chef-license accept-no-persist - displayName: 'Run end_to_end::default recipe' |