Skip to content

Commit 18bc05b

Browse files
committed
shuffle around where we set DOCKER_CONFIG
Setting it directly in the agent environment hook means we don't need to escape the eval. It also means we won't cat it out into build output with the rest of cfn-env. While I was there I also made the same change to windows.
1 parent 3927d72 commit 18bc05b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

packer/linux/conf/bin/bk-install-elastic-stack.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export AWS_DEFAULT_REGION=$AWS_REGION
6060
export AWS_REGION=$AWS_REGION
6161
export PLUGINS_ENABLED="${PLUGINS_ENABLED[*]-}"
6262
export BUILDKITE_ECR_POLICY=${BUILDKITE_ECR_POLICY:-none}
63-
export DOCKER_CONFIG=\$(mktemp -d)
6463
EOF
6564

6665
if [[ "${BUILDKITE_AGENT_RELEASE}" == "edge" ]] ; then

packer/linux/conf/buildkite-agent/hooks/environment

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -eu -o pipefail
44
# shellcheck source=/dev/null
55
source ~/cfn-env
66

7+
# a clean docker config for each job, for improved isolation
8+
export DOCKER_CONFIG=$(mktemp -d)
9+
710
echo "~~~ :llama: Setting up elastic stack environment ($BUILDKITE_STACK_VERSION)"
811
cat ~/cfn-env
912

packer/windows/conf/buildkite-agent/hooks/environment

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -eu -o pipefail
44
# shellcheck source=/dev/null
55
source ~/cfn-env
66

7+
# a clean docker config for each job, for improved isolation
8+
export DOCKER_CONFIG=$(mktemp -d)
9+
710
echo "~~~ :llama: Setting up elastic stack environment ($BUILDKITE_STACK_VERSION)"
811
cat ~/cfn-env
912

0 commit comments

Comments
 (0)