diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-04-22 17:53:51 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-04-22 18:20:23 -0700 |
commit | 7f5c9414fb813c6703849907b4bcc6270c3f16fc (patch) | |
tree | 72ece6fe466eed9d7624222c9e1eb1e5d58a6d90 | |
parent | 1f89b3a03a41f914fd8c8549be3a8568d64844b9 (diff) | |
download | chef-7f5c9414fb813c6703849907b4bcc6270c3f16fc.tar.gz |
Move macOS Test Kitchen tests to GitHub Actions
Move off Azure Pipelines
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | .github/workflows/kitchen.yml | 38 | ||||
-rw-r--r-- | azure-pipelines.yml | 51 |
2 files changed, 37 insertions, 52 deletions
diff --git a/.github/workflows/kitchen.yml b/.github/workflows/kitchen.yml index df7fd3e1b0..bad5a28324 100644 --- a/.github/workflows/kitchen.yml +++ b/.github/workflows/kitchen.yml @@ -31,7 +31,7 @@ jobs: $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 + appbundle-updater chef chef $env:GITHUB_SHA --tarball --github chef/chef Write-Output "Installed Chef / Ohai release:" chef-client -v ohai -v @@ -51,3 +51,39 @@ jobs: # restore the default warning level $env:RUBYOPT="-W1" chef-client -z -o end_to_end --chef-license accept-no-persist + + macos: + strategy: + fail-fast: false + matrix: + os: [macos-10.15] # macos-11.0 is not public for now + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - 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 + /opt/chef/bin/chef-client -v + /opt/chef/bin/ohai -v + /opt/chef/embedded/bin/rake --version + /opt/chef/embedded/bin/bundle -v + - 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 chef/chef + 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 without 'omnibus_package ruby_prof' + sudo /opt/chef/embedded/bin/bundle install --jobs=3 --retry=3 --path=vendor/bundle + 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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ffa1612b6f..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,51 +0,0 @@ -# End-to-End Test of Chef in macOS - -variables: - FORCE_FFI_YAJL: 'ext' - CHEF_LICENSE: 'accept-no-persist' - -trigger: -- master -- chef-16 - -pr: -- master -- chef-16 - -pool: - vmImage: $(imageName) - -jobs: - - job: - strategy: - matrix: - mac_kitchen_tests: - imageName: 'macos-latest' - - steps: - - script: | - brew install coreutils - curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -c current - /opt/chef/bin/chef-client -v - /opt/chef/bin/ohai -v - /opt/chef/embedded/bin/rake --version - /opt/chef/embedded/bin/bundle -v - displayName: 'Install Chef/Ohai from Omnitruck' - - - script: | - 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 $BUILD_SOURCEVERSION --tarball --github chef/chef - echo "Installed Chef / Ohai release:" - /opt/chef/bin/chef-client -v - /opt/chef/bin/ohai -v - displayName: 'Upgrade Chef/Ohai via Appbundler' - - - script: | - cd kitchen-tests - sudo /opt/chef/embedded/bin/bundle config set without 'omnibus_package ruby_prof' - sudo /opt/chef/embedded/bin/bundle install --jobs=3 --retry=3 --path=vendor/bundle - 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 - displayName: 'Run end_to_end::default recipe' |