diff options
author | Lamont Granquist <lamont@chef.io> | 2020-01-28 16:00:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 16:00:34 -0800 |
commit | 3106e35f1c08fd7a4f608780df2b508de5d71ba3 (patch) | |
tree | 61241fed1e19ce5623fa5b83bf6b402931481df9 | |
parent | 88a486593690b7627ea3ce48ef2ac5c5128ecd26 (diff) | |
parent | 43f6d73e3a2728ba93dfb051172f19962aa23c43 (diff) | |
download | chef-3106e35f1c08fd7a4f608780df2b508de5d71ba3.tar.gz |
Add ruby 2.7 expeditor testing (#9271)
Add ruby 2.7 expeditor testing
-rw-r--r-- | .expeditor/verify.pipeline.yml | 51 | ||||
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | omnibus_overrides.rb | 4 | ||||
-rw-r--r-- | scripts/bk_tests/bk_run_choco.ps1 | 18 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_functional.ps1 | 18 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_integration.ps1 | 17 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_unit.ps1 | 18 |
7 files changed, 121 insertions, 7 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 74a0975a3a..b33309b590 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -245,6 +245,56 @@ steps: image: rubydistros/ubuntu-18.04 ######################################################################### +# Tests Ruby 2.7 +######################################################################### + +- label: "Integration Specs :ruby: 2.7" + commands: + - /workdir/scripts/bk_tests/bk_container_prep.sh + - bundle install --jobs=3 --retry=3 --without omnibus_package docgen + - bundle exec rake spec:integration + expeditor: + executor: + docker: + image: ruby:2.7-buster + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - INTEGRATION_SPECS_27=1 +# +- label: "Functional Specs :ruby: 2.7" + commands: + - /workdir/scripts/bk_tests/bk_container_prep.sh + - apt-get install -y cron locales net-tools # needed for functional tests to pass + - bundle install --jobs=3 --retry=3 --without omnibus_package docgen + - bundle exec rake spec:functional + expeditor: + executor: + docker: + image: ruby:2.7-buster + privileged: true + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - FUNCTIONAL_SPECS_27=1 + +- label: "Unit Specs :ruby: 2.7" + commands: + - /workdir/scripts/bk_tests/bk_container_prep.sh + - bundle install --jobs=3 --retry=3 --without omnibus_package docgen + - bundle exec rake spec:unit + - bundle exec rake component_specs + expeditor: + executor: + docker: + image: ruby:2.7-buster + environment: + - FORCE_FFI_YAJL=ext + - CHEF_LICENSE=accept-no-persist + - UNIT_SPECS_27=1 + +######################################################################### # EXTERNAL GEM TESTING ######################################################################### @@ -305,6 +355,7 @@ steps: commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - apt-get install -y graphviz + - gem install bundler -v 1.17.3 # necessary for berks Gemfile.lock for now - bundle install --jobs=3 --retry=3 --without omnibus_package docgen - bundle exec tasks/bin/run_external_test berkshelf/berkshelf master rake expeditor: diff --git a/Gemfile.lock b/Gemfile.lock index 5c85ea02f1..96fed444ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -477,4 +477,4 @@ DEPENDENCIES yard BUNDLED WITH - 1.17.3 + 2.1.2 diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index ccc012c0dc..61bca779b4 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -3,8 +3,8 @@ # # NOTE: You MUST update omnibus-software when adding new versions of # software here: bundle exec rake dependencies:update_omnibus_gemfile_lock -override :rubygems, version: "3.0.3" # rubygems ships its own bundler which may differ from bundler defined below and then we get double bundler which results in performance issues / CLI warnings. Make sure these versions match before bumping either. -override :bundler, version: "1.17.2" # currently pinned to what ships in Ruby to prevent double bundler +override :rubygems, version: "3.1.2" # pin to what ships in the ruby version +override :bundler, version: "2.1.2" # pin to what ships in the ruby version override "libarchive", version: "3.4.0" override "libffi", version: "3.2.1" override "libiconv", version: "1.15" diff --git a/scripts/bk_tests/bk_run_choco.ps1 b/scripts/bk_tests/bk_run_choco.ps1 index 1d4b87a73a..5360cc4914 100644 --- a/scripts/bk_tests/bk_run_choco.ps1 +++ b/scripts/bk_tests/bk_run_choco.ps1 @@ -3,7 +3,23 @@ $Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize choco --version + +echo "--- update bundler and rubygems" + ruby -v + +$env:RUBYGEMS_VERSION=$(findstr rubygems omnibus_overrides.rb | %{ $_.split(" ")[3] }) +$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) + +$env:RUBYGEMS_VERSION=($env:RUBYGEMS_VERSION -replace '"', "") +$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") + +echo $env:RUBYGEMS_VERSION +echo $env:BUNDLER_VERSION + +gem update --system $env:RUBYGEMS_VERSION +gem --version +gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet bundle --version echo "--- bundle install" @@ -12,4 +28,4 @@ bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle echo "+++ bundle exec rspec chocolatey_package_spec" bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb -exit $LASTEXITCODE
\ No newline at end of file +exit $LASTEXITCODE diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1 index 3cca7a7fff..e3a0328ef3 100644 --- a/scripts/bk_tests/bk_win_functional.ps1 +++ b/scripts/bk_tests/bk_win_functional.ps1 @@ -27,7 +27,23 @@ echo "Closing out the layer (this can take awhile)" $Env:Path+=";C:\ruby26\bin" winrm quickconfig -q + +echo "--- update bundler and rubygems" + ruby -v + +$env:RUBYGEMS_VERSION=$(findstr rubygems omnibus_overrides.rb | %{ $_.split(" ")[3] }) +$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) + +$env:RUBYGEMS_VERSION=($env:RUBYGEMS_VERSION -replace '"', "") +$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") + +echo $env:RUBYGEMS_VERSION +echo $env:BUNDLER_VERSION + +gem update --system $env:RUBYGEMS_VERSION +gem --version +gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet bundle --version echo "--- bundle install" @@ -36,4 +52,4 @@ bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle echo "+++ bundle exec rake spec:functional" bundle exec rake spec:functional -exit $LASTEXITCODE
\ No newline at end of file +exit $LASTEXITCODE diff --git a/scripts/bk_tests/bk_win_integration.ps1 b/scripts/bk_tests/bk_win_integration.ps1 index 546a9fbb91..36a6ea2ea9 100644 --- a/scripts/bk_tests/bk_win_integration.ps1 +++ b/scripts/bk_tests/bk_win_integration.ps1 @@ -7,7 +7,22 @@ $Env:Path="C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\ruby winrm quickconfig -q +echo "--- update bundler and rubygems" + ruby -v + +$env:RUBYGEMS_VERSION=$(findstr rubygems omnibus_overrides.rb | %{ $_.split(" ")[3] }) +$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) + +$env:RUBYGEMS_VERSION=($env:RUBYGEMS_VERSION -replace '"', "") +$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") + +echo $env:RUBYGEMS_VERSION +echo $env:BUNDLER_VERSION + +gem update --system $env:RUBYGEMS_VERSION +gem --version +gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet bundle --version echo "--- bundle install" @@ -16,4 +31,4 @@ bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle echo "+++ bundle exec rake spec:integration" bundle exec rake spec:integration -exit $LASTEXITCODE
\ No newline at end of file +exit $LASTEXITCODE diff --git a/scripts/bk_tests/bk_win_unit.ps1 b/scripts/bk_tests/bk_win_unit.ps1 index 48ad3fe283..4e07179a35 100644 --- a/scripts/bk_tests/bk_win_unit.ps1 +++ b/scripts/bk_tests/bk_win_unit.ps1 @@ -1,7 +1,23 @@ echo "--- system details" $Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize + +echo "--- update bundler and rubygems" + ruby -v + +$env:RUBYGEMS_VERSION=$(findstr rubygems omnibus_overrides.rb | %{ $_.split(" ")[3] }) +$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) + +$env:RUBYGEMS_VERSION=($env:RUBYGEMS_VERSION -replace '"', "") +$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") + +echo $env:RUBYGEMS_VERSION +echo $env:BUNDLER_VERSION + +gem update --system $env:RUBYGEMS_VERSION +gem --version +gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet bundle --version echo "--- bundle install" @@ -11,4 +27,4 @@ echo "+++ bundle exec rake" bundle exec rake spec:unit bundle exec rake component_specs -exit $LASTEXITCODE
\ No newline at end of file +exit $LASTEXITCODE |