Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ rubygems:
- ohai

artifact_channels:
- unstable
- chef-dke-lts2024
- stable
- base-2025-current
- base-2025

pipelines:
- habitat/build:
Expand All @@ -28,7 +29,7 @@ pipelines:
- HAB_NOCOLORING: "true"
- HAB_STUDIO_SECRET_HAB_NONINTERACTIVE: "true"
trigger: pull_request

github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
Expand Down Expand Up @@ -85,4 +86,15 @@ subscriptions:
actions:
- built_in:rollover_changelog
- built_in:promote_habitat_packages

# Promote to 'current' on successful Habitat testing
- workload: buildkite_build_passed:{{agent_id}}:habitat/test:*
actions:
- built_in:promote_habitat_packages:
channel: current
- built_in:publish_rubygems

# Promote to 'base-2025' after promoting to 'stable'
- workload: hab_package_published:stable:ohai/19.*
actions:
- bash:.expeditor/scripts/base-2025-promote.sh
26 changes: 26 additions & 0 deletions .expeditor/scripts/base-2025-promote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -euo pipefail

echo "--- Promoting Habitat package from stable to base-2025"

# Expeditor provides these environment variables automatically
echo "Package Origin: ${EXPEDITOR_PKG_ORIGIN}"
echo "Package Name: ${EXPEDITOR_PKG_NAME}"
echo "Package Version: ${EXPEDITOR_PKG_VERSION}"
echo "Package Release: ${EXPEDITOR_PKG_RELEASE}"
echo "Package Ident: ${EXPEDITOR_PKG_IDENT}"
echo "Package Target: ${EXPEDITOR_PKG_TARGET}"
echo "Source Channel: ${EXPEDITOR_CHANNEL}"

# Set the target channel
TARGET_CHANNEL="base-2025"

# Get HAB_AUTH_TOKEN from vault
HAB_AUTH_TOKEN=$(vault kv get -field auth_token account/static/habitat/chef-ci)
export HAB_AUTH_TOKEN

echo "--- Promoting ${EXPEDITOR_PKG_IDENT} to ${TARGET_CHANNEL} channel"
hab pkg promote "${EXPEDITOR_PKG_IDENT}" "${TARGET_CHANNEL}"

echo "--- Promotion completed successfully!"
Loading