Merge pull request 'feat: source environment vars from vault' (#1) from neoloc/environment_vars into master

Reviewed-on: https://git.query.consul/unkin/packer-images/pulls/1
This commit is contained in:
Ben Vincent 2025-01-11 21:47:44 +11:00
commit 980d2c495b

View File

@ -29,6 +29,11 @@ list:
$(DIRS):
@echo "Building for $@"
# Export environment
@for kv in $$(vault kv get -format=json kv/service/packer/builder/env | jq -r '.data.data | to_entries[] | "\(.key)=\(.value)"'); do \
export "$kv"; \
done
# Check if on master branch
@if [ "$(BRANCH)" = "master" ]; then \
echo "Current branch is $(BRANCH), checking latest timestamp in consul."; \