diff options
author | Tim Smith <tsmith@chef.io> | 2021-03-25 18:20:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 18:20:01 -0700 |
commit | 72f5f17a93e1596b7d2437f815523d5c733096e7 (patch) | |
tree | ed60716b97a3a15c7ccc6aa478e37c13280e1e0e | |
parent | c69beb0729ead15f6d6d7a74c55fa211971dcc95 (diff) | |
parent | 60085088f2598dccaaf4abd68224d282fd7be3ed (diff) | |
download | chef-72f5f17a93e1596b7d2437f815523d5c733096e7.tar.gz |
Merge pull request #11251 from chef/fixes
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-x | .expeditor/update_version.sh | 10 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 5 | ||||
-rw-r--r-- | lib/chef/shell.rb | 2 | ||||
-rwxr-xr-x | scripts/bk_tests/bk_container_prep.sh | 2 | ||||
-rw-r--r-- | scripts/bk_tests/bk_win_functional.ps1 | 10 | ||||
-rw-r--r-- | scripts/ci/ensure-minimum-viable-hab.ps1 | 5 |
6 files changed, 19 insertions, 15 deletions
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh index 8b088cbaa9..da097132f7 100755 --- a/.expeditor/update_version.sh +++ b/.expeditor/update_version.sh @@ -11,10 +11,12 @@ set -evx -sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-config/lib/chef-config/version.rb -sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-bin/lib/chef-bin/version.rb -sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-utils/lib/chef-utils/version.rb -sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"$(cat VERSION)\")/" lib/chef/version.rb +VERSION=$(cat VERSION) + +sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-config/lib/chef-config/version.rb +sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-bin/lib/chef-bin/version.rb +sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-utils/lib/chef-utils/version.rb +sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"${VERSION}\")/" lib/chef/version.rb # Update the version inside Gemfile.lock asdf install ruby 2.6.6 diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index bcec3dc592..120630804e 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -7,7 +7,7 @@ expeditor: retry: automatic: limit: 1 - timeout_in_minutes: 30 + timeout_in_minutes: 45 steps: @@ -575,7 +575,10 @@ steps: - label: ":habicat: Windows plan" commands: - ./scripts/ci/verify-plan.ps1 + timeout_in_minutes: 60 expeditor: executor: windows: privileged: true + single-use: true + shell: ["powershell", "-Command"] diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index 7cb34aa5b9..a4c1e71d63 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -325,7 +325,7 @@ module Shell puts "loading configuration: #{config_msg}" # load the config (if we have one) - if !config[:config_file].nil? + unless config[:config_file].nil? if File.exist?(config[:config_file]) && File.readable?(config[:config_file]) Chef::Config.from_file(config[:config_file]) end diff --git a/scripts/bk_tests/bk_container_prep.sh b/scripts/bk_tests/bk_container_prep.sh index 0e9c44b583..9f8a5746ad 100755 --- a/scripts/bk_tests/bk_container_prep.sh +++ b/scripts/bk_tests/bk_container_prep.sh @@ -1,6 +1,6 @@ # This script gets a container ready to run our various tests in BuildKite -echo "--- preparing..." +echo "--- Preparing Container..." export FORCE_FFI_YAJL="ext" export CHEF_LICENSE="accept-no-persist" diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1 index 1df1871221..5995803232 100644 --- a/scripts/bk_tests/bk_win_functional.ps1 +++ b/scripts/bk_tests/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.6" + Write-Output "Add Uru to Environment PATH" $env:PATH = "C:\Program Files (x86)\Uru;" + $env:PATH [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) @@ -16,17 +17,16 @@ Write-Output "Register Installed Ruby Version 2.6 With Uru" Start-Process "C:\Program Files (x86)\Uru\uru_rt.exe" -ArgumentList 'admin add C:\ruby26\bin' -Wait uru 266 if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" } +ruby -v +if (-not $?) { throw "Can't run Ruby. Is it installed?" } Write-Output "--- configure winrm" - winrm quickconfig -q -ruby -v -bundle --version Write-Output "--- bundle install" bundle install --jobs=3 --retry=3 --without omnibus_package +if (-not $?) { throw "Unable to install gem dependencies" } Write-Output "+++ bundle exec rake spec:functional" bundle exec rake spec:functional - -exit $LASTEXITCODE +if (-not $?) { throw "Chef functional specs failing." } diff --git a/scripts/ci/ensure-minimum-viable-hab.ps1 b/scripts/ci/ensure-minimum-viable-hab.ps1 index 175c7d4890..10bfeb0fa8 100644 --- a/scripts/ci/ensure-minimum-viable-hab.ps1 +++ b/scripts/ci/ensure-minimum-viable-hab.ps1 @@ -1,6 +1,5 @@ -$hab_version = (hab --version) -$hab_minor_version = $hab_version.split('.')[1] -if ( -not $? -Or $hab_minor_version -lt 85 ) { +[Version]$hab_version = (hab --version).split(" ")[1].split("/")[0] +if ($hab_version -lt [Version]"0.85.0" ) { Write-Host "--- :habicat: Installing the version of Habitat required" install-habitat --version 0.85.0.20190916 if (-not $?) { throw "Hab version is older than 0.85 and could not update it." } |