diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command new file mode 100644 index 00000000..66752a30 --- /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/buildkite/artifact.habitat.test.sh b/.expeditor/buildkite/artifact.habitat.test.sh index db8dfd14..5bf076c7 100755 --- a/.expeditor/buildkite/artifact.habitat.test.sh +++ b/.expeditor/buildkite/artifact.habitat.test.sh @@ -6,8 +6,7 @@ export HAB_ORIGIN='ci' export PLAN='chef-cli' export CHEF_LICENSE="accept-no-persist" export HAB_LICENSE="accept-no-persist" -export HAB_BLDR_CHANNEL="LTS-2024" -export HAB_REFRESH_CHANNEL="LTS-2024" +export HAB_REFRESH_CHANNEL="base-2025" echo "--- checking if git is installed" if ! command -v git &> /dev/null; then diff --git a/.expeditor/habitat-test.pipeline.yml b/.expeditor/habitat-test.pipeline.yml index a8636693..cf8634ac 100644 --- a/.expeditor/habitat-test.pipeline.yml +++ b/.expeditor/habitat-test.pipeline.yml @@ -16,8 +16,10 @@ steps: expeditor: executor: docker: - image: ruby:3.1 + image: ruby:3.4 privileged: true + environment: + - HAB_AUTH_TOKEN - label: ":windows: Validate Habitat Builds of Test Kitchen" commands: @@ -30,6 +32,7 @@ steps: image: rubydistros/windows-2019:3.1 user: 'NT AUTHORITY\SYSTEM' environment: + - HAB_AUTH_TOKEN - FORCE_FFI_YAJL=ext - EXPIRE_CACHE=true - CHEF_LICENSE=accept-no-persist diff --git a/habitat/plan.sh b/habitat/plan.sh index 5db583de..21a18855 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -1,8 +1,7 @@ -export HAB_BLDR_CHANNEL="LTS-2024" -export HAB_REFRESH_CHANNEL="LTS-2024" +export HAB_REFRESH_CHANNEL="base-2025" pkg_name=chef-cli pkg_origin=chef -ruby_pkg="core/ruby3_1" +ruby_pkg="core/ruby3_4" pkg_deps=(${ruby_pkg} core/coreutils core/libarchive) pkg_build_deps=( core/make @@ -20,7 +19,7 @@ do_setup_environment() { export GEM_PATH="$GEM_HOME" } do_prepare() { - ln -sf "$(pkg_interpreter_for core/ruby3_1 bin/ruby)" "$(pkg_interpreter_for core/coreutils bin/env)" + ln -sf "$(pkg_interpreter_for core/ruby3_4 bin/ruby)" "$(pkg_interpreter_for core/coreutils bin/env)" } pkg_version() { cat "$SRC_PATH/VERSION"