diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-07-16 12:26:41 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-07-16 12:26:41 -0700 |
commit | 1e35804364fe64b3383e1005c341b89a40d54a9f (patch) | |
tree | eeefa42989fa2a41529b73a429474d25ed389dec | |
parent | 3575031ffc022ce8c2322f66d1adf72fc26576c6 (diff) | |
download | mixlib-shellout-ci_fixup.tar.gz |
Make sure Ruby is setupci_fixup
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-x | .expeditor/run_windows_tests.ps1 | 23 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 6 |
2 files changed, 25 insertions, 4 deletions
diff --git a/.expeditor/run_windows_tests.ps1 b/.expeditor/run_windows_tests.ps1 new file mode 100755 index 0000000..8853397 --- /dev/null +++ b/.expeditor/run_windows_tests.ps1 @@ -0,0 +1,23 @@ +Write-Output "--- system details" +$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' +Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize + +$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) + +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 "+++ bundle install" +bundle config --local path vendor/bundle +bundle install --jobs=7 --retry=3 + +Write-Output "+++ bundle exec rake spec" +bundle exec rake spec +if (-not $?) { throw "mixlib-shellout specs failing." }
\ No newline at end of file diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 37a8529..2f834a1 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -44,10 +44,8 @@ steps: image: ruby:2.7-buster - label: run-specs-windows - command: - - bundle config --local path vendor/bundle - - bundle install --jobs=7 --retry=3 - - bundle exec rake + commands: + - .expeditor/run_windows_tests.ps1 expeditor: executor: windows: |