Skip to content

Commit

Permalink
Experditor trigger for promoting pkg
Browse files Browse the repository at this point in the history
Signed-off-by: nitin sanghi <[email protected]>
  • Loading branch information
sanghinitin committed Dec 19, 2024
1 parent bcb33de commit 09cc25e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ slack:
rubygems:
- fauxhai-chef


artifact_channels:
- workstation-build
- stable

release_branches:
- workstation-LTS:
version_constraint: 9.*
Expand Down Expand Up @@ -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

Check failure on line 71 in .expeditor/config.yml

View check run for this annotation

Chef Expeditor / Expeditor Config Validation

.expeditor/config.yml#L37-L71

Mixed up pre-commit/post-commit actions. A post commit action happens before a pre-commit

pipelines:
- verify:
Expand Down
9 changes: 9 additions & 0 deletions .expeditor/promote-hab-pkg.sh
Original file line number Diff line number Diff line change
@@ -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}"

0 comments on commit 09cc25e

Please sign in to comment.