Skip to content

Commit dae7fcf

Browse files
authored
Merge pull request #310 from chef/CHEF-19444-powershell-shim-build-against-base-2025/muthuja
build with hab base-2025 channel
2 parents 7c4d026 + 33c70e0 commit dae7fcf

File tree

8 files changed

+32
-12
lines changed

8 files changed

+32
-12
lines changed

.buildkite/hooks/pre-command

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-canary' ]]; then
4+
AWS_REGION='us-west-1'
5+
elif [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef' ]] || [[ $BUILDKITE_ORGANIZATION_SLUG = 'chef-oss' ]]; then
6+
AWS_REGION='us-west-2'
7+
fi
8+
9+
export HAB_AUTH_TOKEN=$(aws ssm get-parameter --name 'habitat-prod-auth-token' --with-decryption --query Parameter.Value --output text --region ${AWS_REGION})

.expeditor/build_gems.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ $env:MSBuildEnableWorkloadResolver = "false"
2424

2525
# setting the channel in this way gets access to the LTS channel and falls back to stable if the plan doesn't live there.
2626
Write-Output "--- :shovel: Setting the BLDR and REFRESH Channels to LTS"
27-
$env:HAB_BLDR_CHANNEL="LTS-2024"
28-
$env:HAB_REFRESH_CHANNEL = "LTS-2024"
27+
$env:HAB_BLDR_CHANNEL="base-2025"
28+
$env:HAB_REFRESH_CHANNEL = "base-2025"
2929
Write-Output "`r"
3030

3131
Write-Output "--- :screwdriver: Installing Habitat via Choco"
@@ -74,7 +74,7 @@ Write-Output "`r"
7474

7575

7676
Write-Output "--- :construction: Building 64-bit PowerShell DLLs"
77-
hab pkg build Habitat --refresh-channel LTS-2024
77+
hab pkg build Habitat --refresh-channel base-2025
7878
if (-not $?) { throw "unable to build"}
7979
Write-Output "`r"
8080

.expeditor/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ subscriptions:
5353
- "Expeditor: Skip Changelog"
5454
- "Expeditor: Skip All"
5555
- built_in:build_gem:
56-
only_if: built_in:bump_version
56+
only_if: built_in:bump_version
57+
- trigger_pipeline:habitat/build:
58+
ignore_labels:
59+
- "Expeditor: Skip Habitat"
60+
- "Expeditor: Skip All"
5761

5862
# - workload: project_promoted:{{agent_id}}:*
5963
# actions:

.expeditor/manual_gem_release.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ else {
7878
Write-Output "`r"
7979

8080
Write-Output "--- :construction: Building 64-bit PowerShell DLL's"
81-
hab pkg build Habitat --refresh-channel LTS-2024
81+
hab pkg build Habitat --refresh-channel base-2025
8282
if (-not $?) { throw "unable to build" }
8383
Write-Output "`r"
8484

.expeditor/test_plan.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ param (
66
)
77

88
$env:HAB_LICENSE = "accept-no-persist"
9-
$env:HAB_ORIGIN = 'ci'
10-
$env:HAB_BLDR_CHANNEL = 'LTS-2024'
11-
$env:HAB_REFRESH_CHANNEL = 'LTS-2024'
9+
$env:HAB_BLDR_CHANNEL = 'base-2025'
10+
$env:HAB_REFRESH_CHANNEL = 'base-2025'
1211

1312
Write-Host "--- :8ball: :windows: Verifying $Plan"
1413

1514
Write-Host "Using Habitat version $(hab --version)"
1615

16+
# Set HAB_ORIGIN after Habitat installation
17+
Write-Host "HAB_ORIGIN set to 'ci' after installation."
18+
$env:HAB_ORIGIN = 'ci'
19+
1720
if (Test-Path -PathType leaf "/hab/cache/keys/ci-*.sig.key") {
1821
Write-Host "--- :key: Using existing fake '$env:HAB_ORIGIN' origin key"
1922
} else {

.expeditor/verify.pipeline.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expeditor:
55
retry:
66
automatic:
77
limit: 1
8-
timeout_in_minutes: 30
8+
timeout_in_minutes: 60
99

1010
steps:
1111

@@ -18,6 +18,8 @@ steps:
1818
host_os: windows
1919
image: rubydistros/windows-2019:3.1
2020
shell: [ "powershell", "-Command" ]
21+
environment:
22+
- HAB_AUTH_TOKEN
2123

2224
- label: ":windows: pre-build-verify-windows-gem - Ruby 3.4"
2325
commands:
@@ -28,6 +30,8 @@ steps:
2830
host_os: windows
2931
image: rubydistros/windows-2019:3.4
3032
shell: [ "powershell", "-Command" ]
33+
environment:
34+
- HAB_AUTH_TOKEN
3135

3236
- label: ":windows: What version of Ruby are we using?"
3337
command:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Then set these envuironment variables:
1616

1717
```
1818
$env:MSBuildEnableWorkloadResolver = "false";
19-
$env:HAB_BLDR_CHANNEL = "LTS-2024";
19+
$env:HAB_BLDR_CHANNEL = "base-2025";
2020
$env:MSBuildSdksPath = "C:\Program Files\dotnet\sdk";
2121
$env:HAB_ORIGIN = "chef";
2222
```

habitat/plan.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$env:HAB_BLDR_CHANNEL = "LTS-2024"
1+
$env:HAB_BLDR_CHANNEL = "base-2025"
22
$env:MSBuildEnableWorkloadResolver = $false
33
$pkg_name="chef-powershell-shim"
44
$pkg_origin="chef"
@@ -36,7 +36,7 @@ function Invoke-Build {
3636
}
3737

3838
function Invoke-Install {
39-
$VCToolsInstallDir_170 = "$(Get-HabPackagePath visual-build-tools-2022)\Contents\VC\Redist\MSVC\14.40.33807"
39+
$VCToolsInstallDir_170 = "$(Get-HabPackagePath visual-build-tools-2022)\Contents\VC\Redist\MSVC\14.44.35112"
4040
Copy-Item $HAB_CACHE_SRC_PATH/$pkg_dirname/Chef.Powershell.Wrapper/x64/release/*.dll "$pkg_prefix/bin"
4141
Copy-Item "$VCToolsInstallDir_170\x64\Microsoft.VC143.CRT\*.dll" "$pkg_prefix/bin"
4242

0 commit comments

Comments
 (0)