diff options
author | John McCrae <john.mccrae@progress.com> | 2022-12-16 15:12:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-16 15:12:52 -0800 |
commit | 349db91b5e7f68bcf58e0cda5afe7ae9b2bebfdd (patch) | |
tree | 960e44160f5c030675431182b8b33d07fb02ccdc | |
parent | faf41a2b3fbad47e14bb6d058e10d83662d84526 (diff) | |
parent | 5bfb553a9d23d1e2a3c800d1df93920387f52bcc (diff) | |
download | chef-349db91b5e7f68bcf58e0cda5afe7ae9b2bebfdd.tar.gz |
Merge pull request #13440 from chef/jfm/chef18_habitat_test
Correcting the habitat pipeline issue for Windows
-rw-r--r-- | .expeditor/habitat-test.pipeline.yml | 8 | ||||
-rw-r--r-- | .expeditor/scripts/habitat-test.ps1 | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index 20686468f3..b802ea1aa8 100644 --- a/.expeditor/habitat-test.pipeline.yml +++ b/.expeditor/habitat-test.pipeline.yml @@ -37,17 +37,13 @@ steps: - label: ":windows: Validate Habitat Builds of Chef Infra" commands: - - $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS = 'chef/chef-infra-client/18.0.179/20221109104144' - - . ./.expeditor/scripts/ensure-minimum-viable-hab.ps1 - - Write-Host "--- Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS" - - $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") - - hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS - - . ./habitat/tests/test.ps1 -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS + - .expeditor/scripts/habitat-test.ps1 expeditor: executor: windows: privileged: true single-use: true + shell: ["powershell", "-Command"] # Wait for the package testing to succeed before promoting whatever was tested. - wait diff --git a/.expeditor/scripts/habitat-test.ps1 b/.expeditor/scripts/habitat-test.ps1 new file mode 100644 index 0000000000..cf6ede870e --- /dev/null +++ b/.expeditor/scripts/habitat-test.ps1 @@ -0,0 +1,10 @@ +$ErrorActionPreference = 'Stop' + +$EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS = 'chef/chef-infra-client/18.0.179/20221109104144' +$ScriptRoute = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, "ensure-minimum-viable-hab.ps1")) +& "$ScriptRoute" +# . ./scripts/ensure-minimum-viable-hab.ps1 +Write-Host "--- Installing $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS" +$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") +hab pkg install $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS +. ./habitat/tests/test.ps1 -PackageIdentifier $EXPEDITOR_PKG_IDENTS_CHEFINFRACLIENTX86_64WINDOWS |