Skip to content

Commit

Permalink
Correcting the habitat pipeline issue for Windows. Calling PowerShell…
Browse files Browse the repository at this point in the history
… from yml files is problematic.

Signed-off-by: John <john.mccrae@progress.com>
  • Loading branch information
johnmccrae committed Dec 16, 2022
1 parent b737387 commit 5bfb553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .expeditor/habitat-test.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions .expeditor/scripts/habitat-test.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5bfb553

Please sign in to comment.