Skip to content

Commit 688d10d

Browse files
authored
Merge pull request #295 from chef/nikhil/fix-hab-pkg-test-builds
Fixing habitat test builds by declaring HAB_ORIGIN after habitat install
2 parents 7dfd65a + 3a7d277 commit 688d10d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.expeditor/buildkite/artifact.habitat.test.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ $PSDefaultParameterValues['*:ErrorAction']='Stop'
77
$ErrorActionPreference = 'Stop'
88
$env:HAB_BLDR_CHANNEL = "LTS-2024"
99
$env:HAB_REFRESH_CHANNEL = "LTS-2024"
10-
$env:HAB_ORIGIN = 'ci'
1110
$env:CHEF_LICENSE = 'accept-no-persist'
1211
$env:HAB_LICENSE = 'accept-no-persist'
1312
$Plan = 'chef-cli'
@@ -58,6 +57,10 @@ finally {
5857
Write-Host ":habicat: I think I have the version I need to build."
5958
}
6059

60+
# Set HAB_ORIGIN after Habitat installation
61+
Write-Host "HAB_ORIGIN set to 'ci' after installation."
62+
$env:HAB_ORIGIN = 'ci'
63+
6164

6265
Write-Host "--- Generating fake origin key"
6366
hab origin key generate $env:HAB_ORIGIN

.expeditor/buildkite/artifact.habitat.test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
set -eo pipefail
44

5-
export HAB_ORIGIN='ci'
65
export PLAN='chef-cli'
76
export CHEF_LICENSE="accept-no-persist"
87
export HAB_LICENSE="accept-no-persist"
@@ -41,6 +40,10 @@ echo "--- Installing Habitat"
4140
id -a
4241
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | bash
4342

43+
# Set HAB_ORIGIN after Habitat installation
44+
echo "--- Setting HAB_ORIGIN to 'ci' after installation"
45+
export HAB_ORIGIN='ci'
46+
4447
echo "--- :key: Generating fake origin key"
4548
hab origin key generate "$HAB_ORIGIN"
4649

0 commit comments

Comments
 (0)