summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-05-11 11:46:57 -0700
committerGitHub <noreply@github.com>2020-05-11 11:46:57 -0700
commit5fba79ce7da951416db17b3fd25c081862742673 (patch)
tree50c6cbb3b2a05cd597caa4f8ccedf2d4d49be9c4
parent959f2e9113c3968a0af57b7397b9f33b93d3f8af (diff)
parentaef79d6edd7b03aba2577d5d211d5bb1eb541113 (diff)
downloadchef-5fba79ce7da951416db17b3fd25c081862742673.tar.gz
Merge pull request #9835 from chef/stop_upgrading_gems
Stop upgrading rubygems in tests
-rwxr-xr-xscripts/bk_tests/bk_container_prep.sh4
-rw-r--r--scripts/bk_tests/bk_run_choco.ps110
-rw-r--r--scripts/bk_tests/bk_win_functional.ps114
-rw-r--r--scripts/bk_tests/bk_win_integration.ps112
-rw-r--r--scripts/bk_tests/bk_win_unit.ps110
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