diff options
author | Tim Smith <tsmith@chef.io> | 2020-05-11 11:46:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 11:46:57 -0700 |
commit | 5fba79ce7da951416db17b3fd25c081862742673 (patch) | |
tree | 50c6cbb3b2a05cd597caa4f8ccedf2d4d49be9c4 | |
parent | 959f2e9113c3968a0af57b7397b9f33b93d3f8af (diff) | |
parent | aef79d6edd7b03aba2577d5d211d5bb1eb541113 (diff) | |
download | chef-5fba79ce7da951416db17b3fd25c081862742673.tar.gz |
Merge pull request #9835 from chef/stop_upgrading_gems
Stop upgrading rubygems in tests
-rwxr-xr-x | scripts/bk_tests/bk_container_prep.sh | 4 | ||||
-rw-r--r-- | scripts/bk_tests/bk_run_choco.ps1 | 10 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_functional.ps1 | 14 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_integration.ps1 | 12 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_unit.ps1 | 10 |
5 files changed, 8 insertions, 42 deletions
diff --git a/scripts/bk_tests/bk_container_prep.sh b/scripts/bk_tests/bk_container_prep.sh index 0e9c44b583..949f75c0d3 100755 --- a/scripts/bk_tests/bk_container_prep.sh +++ b/scripts/bk_tests/bk_container_prep.sh @@ -12,9 +12,7 @@ if [ -f /etc/debian_version ]; then fi # make sure we have the omnibus_overrides specified version of rubygems / bundler -echo "--- Install proper rubygems / bundler" -gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) -gem --version +echo "--- Install proper bundler" gem uninstall bundler -a -x || true gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) bundle --version diff --git a/scripts/bk_tests/bk_run_choco.ps1 b/scripts/bk_tests/bk_run_choco.ps1 index cf84b1feb5..37a8c2949d 100644 --- a/scripts/bk_tests/bk_run_choco.ps1 +++ b/scripts/bk_tests/bk_run_choco.ps1 @@ -4,23 +4,15 @@ Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table choco --version -echo "--- update bundler and rubygems" +echo "--- update bundler" ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$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 -if (-not $?) { throw "Unable to update system Rubygems" } -gem --version gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet if (-not $?) { throw "Unable to update Bundler" } bundle --version diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1 index 90abfe890f..6bb2e83598 100644 --- a/scripts/bk_tests/bk_win_functional.ps1 +++ b/scripts/bk_tests/bk_win_functional.ps1 @@ -1,5 +1,5 @@ # The filename of the Ruby installer -$RubyFilename = "rubyinstaller-devkit-2.6.5-1-x64.exe" +$RubyFilename = "rubyinstaller-devkit-2.6.6-1-x64.exe" # The sha256 of the Ruby installer (capitalized?) $RubySHA256 = "BD2050496A149C7258ED4E2E44103756CA3A05C7328A939F0FDC97AE9616A96D" @@ -90,26 +90,18 @@ echo "--- configure winrm" winrm quickconfig -q -echo "--- update bundler and rubygems" +echo "--- update bundler" ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$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 -if (-not $?) { throw "Unable to update system Rubygems" } -gem --version gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet if (-not $?) { throw "Unable to update Bundler" } -bundle --versio +bundle --version echo "--- bundle install" bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle diff --git a/scripts/bk_tests/bk_win_integration.ps1 b/scripts/bk_tests/bk_win_integration.ps1 index 88d23802cd..0534a24302 100644 --- a/scripts/bk_tests/bk_win_integration.ps1 +++ b/scripts/bk_tests/bk_win_integration.ps1 @@ -7,26 +7,18 @@ $Env:Path="C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\ruby winrm quickconfig -q -echo "--- update bundler and rubygems" +echo "--- update bundler" ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$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 -if (-not $?) { throw "Unable to update system Rubygems" } -gem --version gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet if (-not $?) { throw "Unable to update Bundler" } -bundle --versio +bundle --version echo "--- bundle install" bundle install --jobs=3 --retry=3 --without omnibus_package docgen chefstyle diff --git a/scripts/bk_tests/bk_win_unit.ps1 b/scripts/bk_tests/bk_win_unit.ps1 index 2ec313fdd0..4d56acf532 100644 --- a/scripts/bk_tests/bk_win_unit.ps1 +++ b/scripts/bk_tests/bk_win_unit.ps1 @@ -2,23 +2,15 @@ echo "--- system details" $Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize -echo "--- update bundler and rubygems" +echo "--- update bundler" ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$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 -if (-not $?) { throw "Unable to update system Rubygems" } -gem --version gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet if (-not $?) { throw "Unable to update Bundler" } bundle --version |