From 3a7602a21d47ab30b314e7a2cb8d42d1296199e0 Mon Sep 17 00:00:00 2001 From: Rian McGuire Date: Thu, 27 Jun 2024 16:12:05 +1000 Subject: [PATCH] Expose DOCKER_USERNS_REMAP to global environment hook The environment hook is using this variable to decide if fix-buildkite-agent-builds-permissions needs to be run. --- packer/linux/conf/bin/bk-install-elastic-stack.sh | 1 + templates/aws-stack.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/packer/linux/conf/bin/bk-install-elastic-stack.sh b/packer/linux/conf/bin/bk-install-elastic-stack.sh index 1199c4e5b..70fa77cda 100755 --- a/packer/linux/conf/bin/bk-install-elastic-stack.sh +++ b/packer/linux/conf/bin/bk-install-elastic-stack.sh @@ -141,6 +141,7 @@ set_always "BUILDKITE_SECRETS_BUCKET_REGION" "$BUILDKITE_SECRETS_BUCKET_ set_always "BUILDKITE_STACK_NAME" "$BUILDKITE_STACK_NAME" set_always "BUILDKITE_STACK_VERSION" "$BUILDKITE_STACK_VERSION" set_always "BUILDKITE_DOCKER_EXPERIMENTAL" "$DOCKER_EXPERIMENTAL" +set_always "DOCKER_USERNS_REMAP" "$DOCKER_USERNS_REMAP" set_always "DOCKER_VERSION" "$DOCKER_VERSION" set_always "PLUGINS_ENABLED" "${PLUGINS_ENABLED[*]-}" set_unless_present "AWS_DEFAULT_REGION" "$AWS_REGION" diff --git a/templates/aws-stack.yml b/templates/aws-stack.yml index 174fab75c..b66667cdf 100644 --- a/templates/aws-stack.yml +++ b/templates/aws-stack.yml @@ -1302,6 +1302,7 @@ Resources: ECR_PLUGIN_ENABLED="${EnableECRPlugin}" \ DOCKER_LOGIN_PLUGIN_ENABLED="${EnableDockerLoginPlugin}" \ DOCKER_EXPERIMENTAL="${EnableDockerExperimental}" \ + DOCKER_USERNS_REMAP=${EnableDockerUserNamespaceRemap} \ AWS_REGION="${AWS::Region}" \ /usr/local/bin/bk-install-elastic-stack.sh --==BOUNDARY==--