Skip to content

Commit

Permalink
update yml to execute plugin script
Browse files Browse the repository at this point in the history
Signed-off-by: poorndm <[email protected]>
  • Loading branch information
poorndm committed Dec 18, 2024
1 parent 09e6bf0 commit 6307436
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .expeditor/hab-export-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ steps:
- chef/habitat#2a479e94e3dec3d2def59f6a7d831d9ab9ee336a
export: chef-demo/hello-omnibus-harmony
format: docker
command:
- echo "--- Executing commands/export.sh from habitat-plugin"
- bash commands/export.sh
expeditor:
accounts:
- aws/chef-cd
executor:
linux:
privileged: true
single-use: true

- label: ":habitat: execute export script"
command:
- echo "--- Executing commands/export.sh from habitat-plugin"
- bash commands/export.sh
expeditor:
accounts:
- aws/chef-cd
Expand All @@ -57,4 +72,4 @@ steps:
# host_os: windows
# environment:
# - BUILD_PKG_TARGET=x86_64-windows
# - BUILDKITE_AGENT_ACCESS_TOKEN
# - BUILDKITE_AGENT_ACCESS_TOKEN
14 changes: 14 additions & 0 deletions .expeditor/scripts/exports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

export_format=$(plugin_read_config FORMAT)

if [[ "${export_format:-}" = "docker" ]]; then
# shellcheck source=../lib/export_docker.sh
. "$DIR/../lib/export_docker.sh"
elif [[ "${export_format:-}" = "tar" ]]; then
# shellcheck source=../lib/export_tarball.sh
. "$DIR/../lib/export_tarball.sh"
else
echo "Unsupported export format: ${export_format:-}. It should be docker or tar. Exiting."
exit 1
fi

0 comments on commit 6307436

Please sign in to comment.