Skip to content

Commit 1b98a2d

Browse files
committed
Ensure AWS_ECR_LOGIN is passed into ECR plugin
1 parent e56ff08 commit 1b98a2d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ if [[ "${BUILDKITE_ECR_POLICY:-}" != "none" && "${ECR_PLUGIN_ENABLED:-}" == "1"
115115
export BUILDKITE_PLUGIN_ECR_ACCOUNT_IDS_0="${AWS_ECR_LOGIN_REGISTRY_IDS}"
116116
fi
117117

118+
# map AWS_ECR_LOGIN into the plugin format
119+
if [[ -n "${AWS_ECR_LOGIN:-}" ]]; then
120+
export BUILDKITE_PLUGIN_ECR_LOGIN="${AWS_ECR_LOGIN}"
121+
fi
122+
118123
# shellcheck source=/dev/null
119124
source /usr/local/buildkite-aws-stack/plugins/ecr/hooks/environment
120125
fi

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ if [[ "${BUILDKITE_ECR_POLICY:-}" != "none" && "${ECR_PLUGIN_ENABLED:-}" == "1"
6161
export BUILDKITE_PLUGIN_ECR_ACCOUNT_IDS_0="${AWS_ECR_LOGIN_REGISTRY_IDS}"
6262
fi
6363

64+
# map AWS_ECR_LOGIN into the plugin format
65+
if [[ -n "${AWS_ECR_LOGIN:-}" ]]; then
66+
export BUILDKITE_PLUGIN_ECR_LOGIN="${AWS_ECR_LOGIN}"
67+
fi
68+
6469
# shellcheck source=/dev/null
6570
source /usr/local/buildkite-aws-stack/plugins/ecr/hooks/environment
6671
fi

0 commit comments

Comments
 (0)