Skip to content

Commit

Permalink
Merge pull request #13440 from chef/jfm/chef18_habitat_test
Browse files Browse the repository at this point in the history
Correcting the habitat pipeline issue for Windows
  • Loading branch information
johnmccrae committed Dec 16, 2022
2 parents faf41a2 + 5bfb553 commit 349db91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .expeditor/habitat-test.pipeline.yml
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .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

0 comments on commit 349db91

Please sign in to comment.