diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-03-31 14:15:38 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-03-31 14:24:30 -0700 |
commit | cd296c0a108c3df40bc45d657dd7dda29c0c0a15 (patch) | |
tree | e3e54cceb0a22721de1a232f6b3b5a64964b2735 | |
parent | e6a5a2335ca2d333b2f82b751fe1917fcbe2ad13 (diff) | |
download | chef-cd296c0a108c3df40bc45d657dd7dda29c0c0a15.tar.gz |
Update all deps and bring in testing enhancements
Sync some of the verify steps with how we do things in chef-15 and mater.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | .expeditor/verify.pipeline.yml | 61 | ||||
-rw-r--r-- | Gemfile.lock | 37 | ||||
-rw-r--r-- | omnibus/Gemfile.lock | 74 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_container_prep.sh | 14 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_linux_exec.sh | 9 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_win_functional.ps1 | 17 |
6 files changed, 84 insertions, 128 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 83f8cbb6e1..09375afde8 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -26,15 +26,12 @@ steps: docker: image: rubydistros/ubuntu-18.04 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - BUNDLE_GEMFILE=/workdir/Gemfile - label: "Functional Specs Ubuntu :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - - apt-get install -y cron locales # needed for functional tests to pass + - apt-get update -y + - apt-get install -y cron locales net-tools # needed for functional tests to pass - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof - bundle exec rake spec:functional expeditor: @@ -42,9 +39,6 @@ steps: docker: image: rubydistros/ubuntu-18.04 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Unit Specs Ubuntu :ruby: 2.6" commands: @@ -56,9 +50,6 @@ steps: executor: docker: image: rubydistros/ubuntu-18.04 - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Integration Specs CentOS :ruby: 2.6" commands: @@ -70,10 +61,6 @@ steps: docker: image: rubydistros/centos-7 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - BUNDLE_GEMFILE=/workdir/Gemfile - label: "Functional Specs CentOS :ruby: 2.6" commands: @@ -86,9 +73,6 @@ steps: docker: image: rubydistros/centos-7 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Unit Specs CentOS :ruby: 2.6" commands: @@ -100,9 +84,6 @@ steps: executor: docker: image: rubydistros/centos-7 - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Integration Specs openSUSE :ruby: 2.6" commands: @@ -114,10 +95,6 @@ steps: docker: image: rubydistros/opensuse-15 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - BUNDLE_GEMFILE=/workdir/Gemfile - label: "Functional Specs openSUSE :ruby: 2.6" commands: @@ -130,9 +107,6 @@ steps: docker: image: rubydistros/opensuse-15 privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Unit Specs openSUSE :ruby: 2.6" commands: @@ -144,9 +118,6 @@ steps: executor: docker: image: rubydistros/opensuse-15 - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Integration Specs Fedora :ruby: 2.6" commands: @@ -158,10 +129,6 @@ steps: docker: image: rubydistros/fedora-latest privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - BUNDLE_GEMFILE=/workdir/Gemfile - label: "Functional Specs Fedora :ruby: 2.6" commands: @@ -188,9 +155,6 @@ steps: executor: docker: image: rubydistros/fedora-latest - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - label: "Integration Specs Windows :ruby: 2.6" commands: @@ -256,28 +220,21 @@ steps: expeditor: executor: docker: - image: ruby:2.5-stretch + image: ruby:2.5-buster privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - INTEGRATION_SPECS_25=1 - label: "Functional Specs :ruby: 2.5" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - - apt-get install -y cron locales # needed for functional tests to pass + - apt-get update -y + - 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.5-stretch + image: ruby:2.5-buster privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - FUNCTIONAL_SPECS_25=1 - label: "Unit Specs :ruby: 2.5" commands: @@ -288,11 +245,7 @@ steps: expeditor: executor: docker: - image: ruby:2.5-stretch - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - - UNIT_SPECS_25=1 + image: ruby:2.5-buster ######################################################################### # EXTERNAL GEM TESTING diff --git a/Gemfile.lock b/Gemfile.lock index 71065cdedc..89669b0acd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,14 +89,14 @@ GEM specs: addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - appbundler (0.13.1) + appbundler (0.13.2) mixlib-cli (>= 1.4, < 3.0) mixlib-shellout (>= 2.0, < 4.0) ast (2.4.0) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) builder (3.2.4) - byebug (11.0.1) + byebug (11.1.1) chef-vault (4.0.1) chef-zero (14.0.17) ffi-yajl (~> 2.2) @@ -129,7 +129,7 @@ GEM ffi-yajl (2.3.3) libyajl2 (~> 1.2) fuzzyurl (0.9.0) - hashdiff (1.0.0) + hashdiff (1.0.1) hashie (3.6.0) highline (1.7.10) htmlentities (4.3.4) @@ -203,7 +203,7 @@ GEM systemu (~> 2.6.4) wmi-lite (~> 1.0) parallel (1.19.1) - parser (2.7.0.2) + parser (2.7.0.5) ast (~> 2.4.0) parslet (1.8.2) pastel (0.7.3) @@ -215,7 +215,7 @@ GEM pry (0.12.2) coderay (~> 1.1.0) method_source (~> 0.9.0) - pry-byebug (3.7.0) + pry-byebug (3.8.0) byebug (~> 11.0) pry (~> 0.10) pry-remote (0.1.8) @@ -225,7 +225,7 @@ GEM binding_of_caller (>= 0.7) pry (>= 0.9.11) public_suffix (4.0.3) - rack (2.1.1) + rack (2.2.2) rainbow (3.0.0) rake (12.3.0) rb-readline (0.5.5) @@ -267,13 +267,12 @@ GEM rspec-its specinfra (~> 2.72) sfl (2.3) - simplecov (0.17.1) + simplecov (0.18.5) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) + simplecov-html (~> 0.11) + simplecov-html (0.12.2) slop (3.6.0) - specinfra (2.82.10) + specinfra (2.82.12) net-scp net-ssh (>= 2.7) net-telnet (= 0.1.1) @@ -291,15 +290,15 @@ GEM term-ansicolor (1.7.1) tins (~> 1.0) thor (0.20.3) - tins (1.24.0) + tins (1.24.1) sync - tomlrb (1.2.9) + tomlrb (1.3.0) train-core (1.7.6) json (>= 1.8, < 3.0) mixlib-shellout (~> 2.0) - tty-color (0.5.0) - tty-cursor (0.7.0) - tty-prompt (0.20.0) + tty-color (0.5.1) + tty-cursor (0.7.1) + tty-prompt (0.21.0) necromancer (~> 0.5.0) pastel (~> 0.7.0) tty-reader (~> 0.7.0) @@ -307,17 +306,17 @@ GEM tty-cursor (~> 0.7) tty-screen (~> 0.7) wisper (~> 2.0.0) - tty-screen (0.7.0) + tty-screen (0.7.1) tty-table (0.11.0) equatable (~> 0.6) necromancer (~> 0.5) pastel (~> 0.7.2) strings (~> 0.1.5) tty-screen (~> 0.7) - unicode-display_width (1.6.0) + unicode-display_width (1.7.0) unicode_utils (1.4.0) uuidtools (2.1.5) - webmock (3.8.0) + webmock (3.8.3) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index be1002d8a5..43d7e3602f 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -32,25 +32,25 @@ GEM artifactory (3.0.12) awesome_print (1.8.0) aws-eventstream (1.0.3) - aws-partitions (1.263.0) - aws-sdk-core (3.89.1) + aws-partitions (1.292.0) + aws-sdk-core (3.92.0) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.27.0) + aws-sdk-kms (1.30.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.60.1) + aws-sdk-s3 (1.61.1) aws-sdk-core (~> 3, >= 3.83.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.1.0) + aws-sigv4 (1.1.1) aws-eventstream (~> 1.0, >= 1.0.2) bcrypt_pbkdf (1.0.1) bcrypt_pbkdf (1.0.1-x64-mingw32) bcrypt_pbkdf (1.0.1-x86-mingw32) - berkshelf (7.0.8) + berkshelf (7.0.9) chef (>= 13.6.52) chef-config cleanroom (~> 1.0) @@ -66,7 +66,7 @@ GEM binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) builder (3.2.4) - byebug (11.0.1) + byebug (11.1.1) chef (14.14.29) addressable bundler (>= 1.10) @@ -163,7 +163,7 @@ GEM equatable (0.6.1) erubi (1.9.0) erubis (2.7.0) - faraday (1.0.0) + faraday (1.0.1) multipart-post (>= 1.2, < 3) ffi (1.12.1) ffi (1.12.1-x64-mingw32) @@ -177,10 +177,10 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - hashie (3.6.0) + hashie (4.1.0) highline (1.7.10) httpclient (2.8.3) - iniparse (1.4.4) + iniparse (1.5.0) iostruct (0.0.4) ipaddress (0.8.3) iso8601 (0.12.1) @@ -188,12 +188,12 @@ GEM kitchen-vagrant (1.6.1) test-kitchen (>= 1.4, < 3) libyajl2 (1.2.0) - license-acceptance (1.0.13) + license-acceptance (1.0.18) pastel (~> 0.7) tomlrb (~> 1.2) tty-box (~> 0.3) tty-prompt (~> 0.18) - license_scout (1.1.3) + license_scout (1.1.7) ffi-yajl (~> 2.2) mixlib-shellout (>= 2.2, < 4.0) toml-rb (>= 1, < 3) @@ -201,7 +201,7 @@ GEM logging (2.2.2) little-plugger (~> 1.1) multi_json (~> 1.10) - method_source (0.9.2) + method_source (1.0.0) minitar (0.9) mixlib-archive (1.0.5) mixlib-log @@ -211,7 +211,7 @@ GEM mixlib-cli (2.1.5) mixlib-config (3.0.6) tomlrb - mixlib-install (3.11.26) + mixlib-install (3.12.1) mixlib-shellout mixlib-versioning thor @@ -223,7 +223,7 @@ GEM mixlib-versioning (1.2.12) molinillo (0.6.6) multi_json (1.14.1) - multipart-post (2.0.0) + multipart-post (2.1.1) necromancer (0.5.1) net-scp (2.0.0) net-ssh (>= 2.6.5, < 6.0.0) @@ -237,7 +237,7 @@ GEM net-ssh-gateway (>= 1.2.0) net-telnet (0.1.1) nori (2.6.0) - octokit (4.15.0) + octokit (4.18.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) ohai (14.14.0) @@ -255,26 +255,28 @@ GEM pastel (0.7.3) equatable (~> 0.6) tty-color (~> 0.5) - pedump (0.5.2) + pedump (0.5.4) awesome_print iostruct (>= 0.0.4) - multipart-post (~> 2.0.0) + multipart-post (>= 2.0.0) progressbar + rainbow zhexdump (>= 0.0.2) plist (3.5.0) progressbar (1.10.1) proxifier (1.0.3) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.7.0) + pry (0.13.0) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) + pry (~> 0.13.0) pry-stack_explorer (0.4.9.3) binding_of_caller (>= 0.7) pry (>= 0.9.11) public_suffix (4.0.3) - rack (2.1.1) + rack (2.2.2) + rainbow (3.0.0) retryable (3.0.5) rspec (3.9.0) rspec-core (~> 3.9.0) @@ -282,7 +284,7 @@ GEM rspec-mocks (~> 3.9.0) rspec-core (3.9.1) rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) + rspec-expectations (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-its (1.3.0) @@ -297,7 +299,7 @@ GEM rspec-core (>= 2, < 4, != 2.12.0) ruby-progressbar (1.10.1) rubyntlm (0.6.2) - rubyzip (2.0.0) + rubyzip (2.3.0) sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) @@ -311,7 +313,7 @@ GEM solve (4.0.3) molinillo (~> 0.6) semverse (>= 1.1, < 4.0) - specinfra (2.82.7) + specinfra (2.82.12) net-scp net-ssh (>= 2.7) net-telnet (= 0.1.1) @@ -324,7 +326,7 @@ GEM structured_warnings (0.4.0) syslog-logger (1.6.8) systemu (2.6.5) - test-kitchen (2.3.4) + test-kitchen (2.4.0) bcrypt_pbkdf (~> 1.0) ed25519 (~> 1.2) license-acceptance (~> 1.0, >= 1.0.11) @@ -340,14 +342,14 @@ GEM thor (0.20.3) toml-rb (2.0.1) citrus (~> 3.0, > 3.0) - tomlrb (1.2.9) + tomlrb (1.3.0) tty-box (0.5.0) pastel (~> 0.7.2) strings (~> 0.1.6) tty-cursor (~> 0.7) - tty-color (0.5.0) - tty-cursor (0.7.0) - tty-prompt (0.20.0) + tty-color (0.5.1) + tty-cursor (0.7.1) + tty-prompt (0.21.0) necromancer (~> 0.5.0) pastel (~> 0.7.0) tty-reader (~> 0.7.0) @@ -355,8 +357,8 @@ GEM tty-cursor (~> 0.7) tty-screen (~> 0.7) wisper (~> 2.0.0) - tty-screen (0.7.0) - unicode-display_width (1.6.0) + tty-screen (0.7.1) + unicode-display_width (1.7.0) unicode_utils (1.4.0) uuidtools (2.1.5) win32-api (1.5.3-universal-mingw32) @@ -377,7 +379,7 @@ GEM win32-ipc (>= 0.6.0) win32-process (0.8.3) ffi (>= 1.0.0) - win32-service (2.1.4) + win32-service (2.1.5) ffi ffi-win32-extensions win32-taskscheduler (2.0.4) @@ -392,7 +394,7 @@ GEM logging (>= 1.6.1, < 3.0) nori (~> 2.0) rubyntlm (~> 0.6.0, >= 0.6.1) - winrm-elevated (1.1.2) + winrm-elevated (1.2.1) erubi (~> 1.8) winrm (~> 2.0) winrm-fs (~> 1.0) diff --git a/scripts/bk_tests/bk_container_prep.sh b/scripts/bk_tests/bk_container_prep.sh index 1718c45b72..8c3bda15e0 100755 --- a/scripts/bk_tests/bk_container_prep.sh +++ b/scripts/bk_tests/bk_container_prep.sh @@ -1,14 +1,18 @@ # This script gets a container ready to run our various tests in BuildKite +echo "--- preparing..." + +export FORCE_FFI_YAJL="ext" +export CHEF_LICENSE="accept-no-persist" +export BUNDLE_GEMFILE="/workdir/Gemfile" + # make sure we have the network tools in place for various network specs if [ -f /etc/debian_version ]; then - apt-get update -y && apt-get install -y net-tools iproute2 touch /etc/network/interfaces -elif [ -f /etc/redhat-release ]; then - yum install -y net-tools 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 gem uninstall bundler -a -x || true @@ -16,6 +20,4 @@ gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) bundle --version rm -f .bundle/config -# force all .rspec tests into progress display to reduce line count -echo --color > .rspec -echo -fp >> .rspec
\ No newline at end of file +echo +++ testing diff --git a/scripts/bk_tests/bk_linux_exec.sh b/scripts/bk_tests/bk_linux_exec.sh index cc8842bcf3..e74f598d40 100755 --- a/scripts/bk_tests/bk_linux_exec.sh +++ b/scripts/bk_tests/bk_linux_exec.sh @@ -1,6 +1,7 @@ #!/bin/bash # Enable IPv6 in docker +echo "--- Enabling ipv6 on docker" sudo systemctl stop docker echo "Enabling IPv6 in Docker config" dockerd_config="/etc/docker/daemon.json" @@ -12,9 +13,11 @@ docker version sudo service docker status # Install C and C++ +echo "--- Installing package deps" sudo yum install -y gcc gcc-c++ openssl-devel readline-devel zlib-devel # Install omnibus-toolchain for git bundler and gem +echo "--- Installing omnibus toolchain" curl -fsSL https://chef.io/chef/install.sh | sudo bash -s -- -P omnibus-toolchain # Set Environment Variables @@ -32,9 +35,9 @@ sudo git clone https://github.com/asdf-vm/asdf.git /opt/asdf echo "--- Installing Ruby ASDF plugin" /opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git -echo "--- Installing Ruby 2.5.7" -/opt/asdf/bin/asdf install ruby 2.5.7 -/opt/asdf/bin/asdf global ruby 2.5.7 +echo "--- Installing Ruby 2.6.5" +/opt/asdf/bin/asdf install ruby 2.6.5 +/opt/asdf/bin/asdf global ruby 2.6.5 # Update Gems gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1 index 23b7263529..bd262fed9c 100755 --- a/scripts/bk_tests/bk_win_functional.ps1 +++ b/scripts/bk_tests/bk_win_functional.ps1 @@ -5,26 +5,23 @@ Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table # chocolatey functional tests fail so delete the chocolatey binary to avoid triggering them Remove-Item -Path C:\ProgramData\chocolatey\bin\choco.exe -ErrorAction SilentlyContinue -# -# Software Languages -# - -# Install Ruby + Devkit +echo "--- install ruby + devkit" $ErrorActionPreference = 'Stop' echo "Downloading Ruby + DevKit" -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -(New-Object System.Net.WebClient).DownloadFile('https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.7-1/rubyinstaller-devkit-2.6.5-1-x64.exe', 'c:\\rubyinstaller-devkit-2.6.5-1-x64.exe') +aws s3 cp s3://public-cd-buildkite-cache/rubyinstaller-devkit-2.6.5-1-x64.exe c:/rubyinstaller-devkit-2.6.5-1-x64.exe echo "Installing Ruby + DevKit" -Start-Process c:\rubyinstaller-devkit-2.5.7-1-x64.exe -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait +Start-Process c:\rubyinstaller-devkit-2.6.5-1-x64.exe -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait echo "Cleaning up installation" -Remove-Item c:\rubyinstaller-devkit-2.5.7-1-x64.exe -Force +Remove-Item c:\rubyinstaller-devkit-2.6.5-1-x64.exe -Force echo "Closing out the layer (this can take awhile)" # Set-Item -Path Env:Path -Value to include ruby26 -$Env:Path+=";C:\ruby25\bin" +$Env:Path+=";C:\ruby26\bin" + +echo "--- configure winrm" winrm quickconfig -q ruby -v |