From 3fa833c5361581e925eda35cbc0f7bcfeb0fd98f Mon Sep 17 00:00:00 2001 From: muthuja Date: Wed, 16 Jul 2025 21:02:35 +0530 Subject: [PATCH 1/5] build with hab base-2025 channel Signed-off-by: muthuja --- .expeditor/build_gems.ps1 | 6 +++--- .expeditor/manual_gem_release.ps1 | 2 +- .expeditor/test_plan.ps1 | 9 ++++++--- README.md | 2 +- habitat/plan.ps1 | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.expeditor/build_gems.ps1 b/.expeditor/build_gems.ps1 index ef1568f..1956e40 100644 --- a/.expeditor/build_gems.ps1 +++ b/.expeditor/build_gems.ps1 @@ -24,8 +24,8 @@ $env:MSBuildEnableWorkloadResolver = "false" # setting the channel in this way gets access to the LTS channel and falls back to stable if the plan doesn't live there. Write-Output "--- :shovel: Setting the BLDR and REFRESH Channels to LTS" -$env:HAB_BLDR_CHANNEL="LTS-2024" -$env:HAB_REFRESH_CHANNEL = "LTS-2024" +$env:HAB_BLDR_CHANNEL="base-2025" +$env:HAB_REFRESH_CHANNEL = "base-2025" Write-Output "`r" Write-Output "--- :screwdriver: Installing Habitat via Choco" @@ -74,7 +74,7 @@ Write-Output "`r" Write-Output "--- :construction: Building 64-bit PowerShell DLLs" -hab pkg build Habitat --refresh-channel LTS-2024 +hab pkg build Habitat --refresh-channel base-2025 if (-not $?) { throw "unable to build"} Write-Output "`r" diff --git a/.expeditor/manual_gem_release.ps1 b/.expeditor/manual_gem_release.ps1 index 7f9ba74..9f9088d 100644 --- a/.expeditor/manual_gem_release.ps1 +++ b/.expeditor/manual_gem_release.ps1 @@ -78,7 +78,7 @@ else { Write-Output "`r" Write-Output "--- :construction: Building 64-bit PowerShell DLL's" -hab pkg build Habitat --refresh-channel LTS-2024 +hab pkg build Habitat --refresh-channel base-2025 if (-not $?) { throw "unable to build" } Write-Output "`r" diff --git a/.expeditor/test_plan.ps1 b/.expeditor/test_plan.ps1 index 993347f..023f8ae 100644 --- a/.expeditor/test_plan.ps1 +++ b/.expeditor/test_plan.ps1 @@ -6,14 +6,17 @@ param ( ) $env:HAB_LICENSE = "accept-no-persist" -$env:HAB_ORIGIN = 'ci' -$env:HAB_BLDR_CHANNEL = 'LTS-2024' -$env:HAB_REFRESH_CHANNEL = 'LTS-2024' +$env:HAB_BLDR_CHANNEL = 'base-2025' +$env:HAB_REFRESH_CHANNEL = 'base-2025' Write-Host "--- :8ball: :windows: Verifying $Plan" Write-Host "Using Habitat version $(hab --version)" +# Set HAB_ORIGIN after Habitat installation +Write-Host "HAB_ORIGIN set to 'ci' after installation." +$env:HAB_ORIGIN = 'ci' + if (Test-Path -PathType leaf "/hab/cache/keys/ci-*.sig.key") { Write-Host "--- :key: Using existing fake '$env:HAB_ORIGIN' origin key" } else { diff --git a/README.md b/README.md index 4fe98d2..f06089e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Then set these envuironment variables: ``` $env:MSBuildEnableWorkloadResolver = "false"; -$env:HAB_BLDR_CHANNEL = "LTS-2024"; +$env:HAB_BLDR_CHANNEL = "base-2025"; $env:MSBuildSdksPath = "C:\Program Files\dotnet\sdk"; $env:HAB_ORIGIN = "chef"; ``` diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index d55312b..d486f4c 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -1,4 +1,4 @@ -$env:HAB_BLDR_CHANNEL = "LTS-2024" +$env:HAB_BLDR_CHANNEL = "base-2025" $env:MSBuildEnableWorkloadResolver = $false $pkg_name="chef-powershell-shim" $pkg_origin="chef" From 34450873262da1528d9e43d2f817d81fba0716fa Mon Sep 17 00:00:00 2001 From: muthuja Date: Wed, 16 Jul 2025 21:07:32 +0530 Subject: [PATCH 2/5] build with hab base-2025 channel Signed-off-by: muthuja From 6fcf2ea37a20cd12f694a686545f2403b04d9cd1 Mon Sep 17 00:00:00 2001 From: muthuja Date: Thu, 17 Jul 2025 15:30:06 +0530 Subject: [PATCH 3/5] update vs code tool version Signed-off-by: muthuja provide HAB_AUTH_TOKEN as an argument instead of an env and test Signed-off-by: muthuja provide HAB_AUTH_TOKEN as an argument instead of an env and test Signed-off-by: muthuja provide HAB_AUTH_TOKEN as an argument instead of an env and test Signed-off-by: muthuja provide HAB_AUTH_TOKEN as an argument instead of an env and test Signed-off-by: muthuja execute verify on github actions Signed-off-by: muthuja --- .buildkite/hooks/pre-command | 9 +++++++++ .expeditor/verify.pipeline.yml | 4 ++++ habitat/plan.ps1 | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .buildkite/hooks/pre-command diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command new file mode 100644 index 0000000..66752a3 --- /dev/null +++ b/.buildkite/hooks/pre-command @@ -0,0 +1,9 @@ +#!/bin/bash + +if [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-canary' ]]; then + AWS_REGION='us-west-1' +elif [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef' ]] || [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-oss' ]]; then + AWS_REGION='us-west-2' +fi + +export HAB_AUTH_TOKEN=$(aws ssm get-parameter --name 'habitat-prod-auth-token' --with-decryption --query Parameter.Value --output text --region ${AWS_REGION}) \ No newline at end of file diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 5443ab7..be820bf 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -18,6 +18,8 @@ steps: host_os: windows image: rubydistros/windows-2019:3.1 shell: [ "powershell", "-Command" ] + environment: + - HAB_AUTH_TOKEN - label: ":windows: pre-build-verify-windows-gem - Ruby 3.4" commands: @@ -28,6 +30,8 @@ steps: host_os: windows image: rubydistros/windows-2019:3.4 shell: [ "powershell", "-Command" ] + environment: + - HAB_AUTH_TOKEN - label: ":windows: What version of Ruby are we using?" command: diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index d486f4c..170498b 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -36,7 +36,7 @@ function Invoke-Build { } function Invoke-Install { - $VCToolsInstallDir_170 = "$(Get-HabPackagePath visual-build-tools-2022)\Contents\VC\Redist\MSVC\14.40.33807" + $VCToolsInstallDir_170 = "$(Get-HabPackagePath visual-build-tools-2022)\Contents\VC\Redist\MSVC\14.44.35112" Copy-Item $HAB_CACHE_SRC_PATH/$pkg_dirname/Chef.Powershell.Wrapper/x64/release/*.dll "$pkg_prefix/bin" Copy-Item "$VCToolsInstallDir_170\x64\Microsoft.VC143.CRT\*.dll" "$pkg_prefix/bin" From 839a4b725d14452a86ed06e7f6b910db94bbb271 Mon Sep 17 00:00:00 2001 From: muthuja Date: Mon, 21 Jul 2025 19:28:44 +0530 Subject: [PATCH 4/5] enable trigger hab pipeline on pr merge Signed-off-by: muthuja enable trigger hab pipeline on pr merge Signed-off-by: muthuja enable trigger hab pipeline on pr merge Signed-off-by: muthuja enable trigger hab pipeline on pr merge Signed-off-by: muthuja enable trigger hab pipeline on pr merge Signed-off-by: muthuja enable trigger hab pipeline on pr merge Signed-off-by: muthuja --- .expeditor/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 37cec89..c8c5c54 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -53,7 +53,11 @@ subscriptions: - "Expeditor: Skip Changelog" - "Expeditor: Skip All" - built_in:build_gem: - only_if: built_in:bump_version + only_if: built_in:bump_version + - trigger_pipeline:habitat/build: + ignore_labels: + - "Expeditor: Skip Habitat" + - "Expeditor: Skip All" # - workload: project_promoted:{{agent_id}}:* # actions: From 33c70e070b51ddc74667aadaacd5673f77d348b3 Mon Sep 17 00:00:00 2001 From: muthuja Date: Mon, 21 Jul 2025 21:13:08 +0530 Subject: [PATCH 5/5] update timeout to 60min for verify Signed-off-by: muthuja --- .expeditor/verify.pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index be820bf..26e7c39 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -5,7 +5,7 @@ expeditor: retry: automatic: limit: 1 - timeout_in_minutes: 30 + timeout_in_minutes: 60 steps: