diff options
author | Tim Smith <tsmith@chef.io> | 2020-12-28 20:36:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 20:36:44 -0800 |
commit | 54df59acb3328de4bb58b614419e4d8299251d5e (patch) | |
tree | 8aafeed1519bea7dd1038f04b5b72b85708c8e80 | |
parent | fd3d813097803bdd9f506f7141e8621369b657f4 (diff) | |
parent | 22ee2d76a405e8f038a3a15b4bc4c4ca3f612967 (diff) | |
download | chef-54df59acb3328de4bb58b614419e4d8299251d5e.tar.gz |
Merge pull request #10786 from chef/scripts
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-x | .expeditor/scripts/bk_container_prep.sh | 18 | ||||
-rwxr-xr-x | .expeditor/scripts/bk_linux_exec.sh | 4 | ||||
-rw-r--r-- | .expeditor/scripts/bk_win_functional.ps1 | 20 | ||||
-rw-r--r-- | .expeditor/scripts/bk_win_prep.ps1 | 15 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 6 | ||||
-rw-r--r-- | omnibus_overrides.rb | 1 |
6 files changed, 30 insertions, 34 deletions
diff --git a/.expeditor/scripts/bk_container_prep.sh b/.expeditor/scripts/bk_container_prep.sh index 949f75c0d3..e065f20579 100755 --- a/.expeditor/scripts/bk_container_prep.sh +++ b/.expeditor/scripts/bk_container_prep.sh @@ -1,6 +1,16 @@ # This script gets a container ready to run our various tests in BuildKite -echo "--- preparing..." +echo "--- Container Config..." + +source /etc/os-release +echo $PRETTY_NAME + +echo "ruby version:" +ruby -v +echo "bundler version:" +bundle -v + +echo "--- Preparing Container..." export FORCE_FFI_YAJL="ext" export CHEF_LICENSE="accept-no-persist" @@ -11,11 +21,7 @@ if [ -f /etc/debian_version ]; then touch /etc/network/interfaces fi -# make sure we have the omnibus_overrides specified version of rubygems / bundler -echo "--- Install proper bundler" -gem uninstall bundler -a -x || true -gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) -bundle --version +# remove default bundler config if there is one rm -f .bundle/config echo "+++ Run tests" diff --git a/.expeditor/scripts/bk_linux_exec.sh b/.expeditor/scripts/bk_linux_exec.sh index 415f646a3c..f1202bbcbb 100755 --- a/.expeditor/scripts/bk_linux_exec.sh +++ b/.expeditor/scripts/bk_linux_exec.sh @@ -31,8 +31,10 @@ echo "--- Config information" echo "!!!! RUBY VERSION !!!!" ruby --version -echo "!!!! BUNDLE LOCATION !!!!" +echo "!!!! BUNDLER LOCATION !!!!" which bundle +echo "!!!! BUNDLER VERSION !!!!" +bundle -v echo "!!!! DOCKER VERSION !!!!" docker version echo "!!!! DOCKER STATUS !!!!" diff --git a/.expeditor/scripts/bk_win_functional.ps1 b/.expeditor/scripts/bk_win_functional.ps1 index 3cc38f0b37..05f8e57248 100644 --- a/.expeditor/scripts/bk_win_functional.ps1 +++ b/.expeditor/scripts/bk_win_functional.ps1 @@ -8,6 +8,7 @@ Remove-Item -Path C:\ProgramData\chocolatey\bin\choco.exe -ErrorAction SilentlyC $ErrorActionPreference = 'Stop' Write-Output "--- Enable Ruby 2.7" + Write-Output "Add Uru to Environment PATH" $env:PATH = "C:\Program Files (x86)\Uru;" + $env:PATH [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) @@ -16,26 +17,15 @@ Write-Output "Register Installed Ruby Version 2.7 With Uru" Start-Process "C:\Program Files (x86)\Uru\uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait uru 271 if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" } - -Write-Output "--- configure winrm" - -winrm quickconfig -q - -Write-Output "--- update bundler" - ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) -$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") -Write-Output $env:BUNDLER_VERSION - -gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet -if (-not $?) { throw "Unable to update Bundler" } -bundle --version +Write-Output "--- configure winrm" +winrm quickconfig -q Write-Output "--- bundle install" -bundle install --jobs=3 --retry=3 --without omnibus_package +bundle config set --local without 'omnibus_package' +bundle install --jobs=3 --retry=3 if (-not $?) { throw "Unable to install gem dependencies" } Write-Output "+++ bundle exec rake spec:functional" diff --git a/.expeditor/scripts/bk_win_prep.ps1 b/.expeditor/scripts/bk_win_prep.ps1 index 1a09378fee..37796da468 100644 --- a/.expeditor/scripts/bk_win_prep.ps1 +++ b/.expeditor/scripts/bk_win_prep.ps1 @@ -2,19 +2,14 @@ echo "--- system details" $Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize -echo "--- update bundler" - +echo "ruby version:" ruby -v if (-not $?) { throw "Can't run Ruby. Is it installed?" } -$env:BUNDLER_VERSION=$(findstr bundler omnibus_overrides.rb | %{ $_.split(" ")[3] }) -$env:BUNDLER_VERSION=($env:BUNDLER_VERSION -replace '"', "") -echo $env:BUNDLER_VERSION - -gem install bundler -v $env:BUNDLER_VERSION --force --no-document --quiet -if (-not $?) { throw "Unable to update Bundler" } +echo "bundler version: " bundle --version +if (-not $?) { throw "Can't run Bundler. Is it installed?" } echo "--- bundle install" -bundle install --jobs=3 --retry=3 --without omnibus_package -if (-not $?) { throw "Unable to install gem dependencies" } +bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package +if (-not $?) { throw "Unable to install gem dependencies" }
\ No newline at end of file diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 5dedd278b4..845574af45 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -244,6 +244,7 @@ steps: - label: "Chefstyle :ruby: 2.6" commands: + - gem install bundler -v 2.1.4 # match Ruby 2.7 bundler - /workdir/.expeditor/scripts/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package ruby_prof - bundle exec rake style @@ -254,6 +255,7 @@ steps: - label: "Integration :ruby: 2.6" commands: + - gem install bundler -v 2.1.4 # match Ruby 2.7 bundler - /workdir/.expeditor/scripts/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package - bundle exec rake spec:integration @@ -265,6 +267,7 @@ steps: - label: "Functional :ruby: 2.6" commands: + - gem install bundler -v 2.1.4 # match Ruby 2.7 bundler - /workdir/.expeditor/scripts/bk_container_prep.sh - apt-get update -y - apt-get install -y cron locales net-tools # needed for functional tests to pass @@ -278,6 +281,7 @@ steps: - label: "Unit :ruby: 2.6" commands: + - gem install bundler -v 2.1.4 # match Ruby 2.7 bundler - /workdir/.expeditor/scripts/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package - bundle exec rake spec:unit @@ -322,7 +326,7 @@ steps: expeditor: executor: docker: - image: rubydistros/ubuntu-18.04:2.6 + image: rubydistros/ubuntu-18.04:2.7 - label: "chefspec gem :ruby: 2.7" commands: diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index b7d515341a..e27b55bc98 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -4,7 +4,6 @@ # 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.1.4" # pin to what ships in the ruby version -override :bundler, version: "2.1.4" # pin to what ships in the ruby version override "libarchive", version: "3.5.0" override "libffi", version: "3.3" override "libiconv", version: "1.16" |