diff options
author | John <john.mccrae@progress.com> | 2022-12-14 15:24:32 -0800 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2022-12-16 11:09:21 -0800 |
commit | 5bfb553a9d23d1e2a3c800d1df93920387f52bcc (patch) | |
tree | 960e44160f5c030675431182b8b33d07fb02ccdc | |
parent | b7373874e39d083bb22d63dac5bcedeb3d99c0f6 (diff) | |
download | chef-5bfb553a9d23d1e2a3c800d1df93920387f52bcc.tar.gz |
Correcting the habitat pipeline issue for Windows. Calling PowerShell from yml files is problematic.
Signed-off-by: John <john.mccrae@progress.com>
-rw-r--r-- | .expeditor/habitat-test.pipeline.yml | 2 | ||||
-rw-r--r-- | .expeditor/scripts/habitat-test.ps1 | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index a898b67a5e..b802ea1aa8 100644 --- a/.expeditor/habitat-test.pipeline.yml +++ b/.expeditor/habitat-test.pipeline.yml @@ -37,7 +37,7 @@ steps: - label: ":windows: Validate Habitat Builds of Chef Infra" commands: - - /workdir/.expeditor/scripts/habitat-test.ps1 + - .expeditor/scripts/habitat-test.ps1 expeditor: executor: windows: 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 |