This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-login-ecr() { | |
local ecr_account_profile=${ECR_ACCOUNT_PROFILE:-utility} | |
local ecr_region | |
local ecr_account_id | |
ecr_account_id="$(aws configure get "$ecr_account_profile.role_arn" | awk -F: '{ print $5 }')" | |
if [[ -z "$ecr_account_id" ]] ; then | |
return 1 | |
fi | |
ecr_region=$(aws configure get "$ecr_account_profile.region") | |
if [[ -z "$ecr_region" ]] ; then |