Skip to content

Commit f7b047f

Browse files
authored
CHEF-21123 - Ruby 3.4 update in chef-cli hab package (#291)
* update ruby to 3.4 and fetch from base-2025 channel Signed-off-by: nikhil2611 <[email protected]> * updating channel name and ruby versopn in pipeline Signed-off-by: nikhil2611 <[email protected]> * addition of Habitat authentication tokens in habitat-test.pipeline.yml Signed-off-by: nikhil2611 <[email protected]> --------- Signed-off-by: nikhil2611 <[email protected]>
1 parent 33b8aa5 commit f7b047f

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
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/buildkite/artifact.habitat.test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export HAB_ORIGIN='ci'
66
export PLAN='chef-cli'
77
export CHEF_LICENSE="accept-no-persist"
88
export HAB_LICENSE="accept-no-persist"
9-
export HAB_BLDR_CHANNEL="LTS-2024"
10-
export HAB_REFRESH_CHANNEL="LTS-2024"
9+
export HAB_REFRESH_CHANNEL="base-2025"
1110

1211
echo "--- checking if git is installed"
1312
if ! command -v git &> /dev/null; then

.expeditor/habitat-test.pipeline.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ steps:
1616
expeditor:
1717
executor:
1818
docker:
19-
image: ruby:3.1
19+
image: ruby:3.4
2020
privileged: true
21+
environment:
22+
- HAB_AUTH_TOKEN
2123

2224
- label: ":windows: Validate Habitat Builds of Test Kitchen"
2325
commands:
@@ -30,6 +32,7 @@ steps:
3032
image: rubydistros/windows-2019:3.1
3133
user: 'NT AUTHORITY\SYSTEM'
3234
environment:
35+
- HAB_AUTH_TOKEN
3336
- FORCE_FFI_YAJL=ext
3437
- EXPIRE_CACHE=true
3538
- CHEF_LICENSE=accept-no-persist

habitat/plan.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
export HAB_BLDR_CHANNEL="LTS-2024"
2-
export HAB_REFRESH_CHANNEL="LTS-2024"
1+
export HAB_REFRESH_CHANNEL="base-2025"
32
pkg_name=chef-cli
43
pkg_origin=chef
5-
ruby_pkg="core/ruby3_1"
4+
ruby_pkg="core/ruby3_4"
65
pkg_deps=(${ruby_pkg} core/coreutils core/libarchive)
76
pkg_build_deps=(
87
core/make
@@ -20,7 +19,7 @@ do_setup_environment() {
2019
export GEM_PATH="$GEM_HOME"
2120
}
2221
do_prepare() {
23-
ln -sf "$(pkg_interpreter_for core/ruby3_1 bin/ruby)" "$(pkg_interpreter_for core/coreutils bin/env)"
22+
ln -sf "$(pkg_interpreter_for core/ruby3_4 bin/ruby)" "$(pkg_interpreter_for core/coreutils bin/env)"
2423
}
2524
pkg_version() {
2625
cat "$SRC_PATH/VERSION"

0 commit comments

Comments
 (0)