diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-05-10 20:48:36 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-05-10 20:48:36 -0700 |
commit | b4eeea2f42e13ddb582e91d84145b5d32259983a (patch) | |
tree | ca46c872e6b95272056ed399af5543a32f090c26 /scripts | |
parent | 959f2e9113c3968a0af57b7397b9f33b93d3f8af (diff) | |
download | chef-b4eeea2f42e13ddb582e91d84145b5d32259983a.tar.gz |
Stop updating rubygems in our test scripts
Rubygems is built into ruby and we're not updating it anymore in our
builds. We get the version that ships in Ruby
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'scripts')
-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 | 12 | ||||
-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, 7 insertions, 41 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..e08c230ae5 100644 --- a/scripts/bk_tests/bk_win_functional.ps1 +++ b/scripts/bk_tests/bk_win_functional.ps1 @@ -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 |