Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aws cli version 2 #435

Merged
merged 1 commit into from
Jun 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion subt_ign/scripts/subt_docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ fi

# Log into docker
echo "Logging into docker"
$(aws ecr get-login --no-include-email --region us-east-1)
awsVersion=`aws --version`
if [[ "$awsVersion" == *"aws-cli/1"* ]]; then
$(aws ecr get-login --no-include-email --region us-east-1)
elif [[ "$awsVersion" == *"aws-cli/2"* ]]; then
$(aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 200670743174.dkr.ecr.us-east-1.amazonaws.com)
else
echo "Unsupported aws cli version $awsVersion"
exit
fi

if [ $? != 0 ]; then
echo "Failed to log into docker. Check your AWS credentials."
Expand Down