From 09cc25e3fd6e3208932d1fee6957230ded152a3e Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Thu, 19 Dec 2024 11:30:03 +0530 Subject: [PATCH] Experditor trigger for promoting pkg Signed-off-by: nitin sanghi --- .expeditor/config.yml | 8 +++++++- .expeditor/promote-hab-pkg.sh | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .expeditor/promote-hab-pkg.sh diff --git a/.expeditor/config.yml b/.expeditor/config.yml index d38825a..5d2e196 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -9,6 +9,11 @@ slack: rubygems: - fauxhai-chef + +artifact_channels: + - workstation-build + - stable + release_branches: - workstation-LTS: version_constraint: 9.* @@ -62,7 +67,8 @@ subscriptions: - workload: buildkite_hab_build_group_published:{{agent_id}}:* actions: # when all of the hab package publish to the unstable channel, test and promote them - - trigger_pipeline:habitat/test + - built_in:promote_habitat_packages + - bash:.expeditor/promote-hab-pkg.sh pipelines: - verify: diff --git a/.expeditor/promote-hab-pkg.sh b/.expeditor/promote-hab-pkg.sh new file mode 100644 index 0000000..02923a1 --- /dev/null +++ b/.expeditor/promote-hab-pkg.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -eou pipefail + +HAB_AUTH_TOKEN=$(vault kv get -field auth_token account/static/habitat/chef-ci) +export HAB_AUTH_TOKEN + +source_channel="workstation-build" + hab pkg promote "${EXPEDITOR_PKG_IDENT}" "${EXPEDITOR_TARGET_CHANNEL}" "${EXPEDITOR_PKG_TARGET}" \ No newline at end of file