Skip to content

Conversation

@renkoh
Copy link
Contributor

@renkoh renkoh commented Feb 21, 2022

Adds support for aws-cli v2, which is installed by default on newer versions of Elastic CI.

Maintains backwards compatibility with aws-cli v1.17.10 (released in Febuary 2020) or later

local aws_cli_version=$(aws --version 2>&1 | cut -d " " -f1 | cut -d "/" -f2)

if [[ $aws_cli_version =~ ^1 ]]; then
$(aws ecr get-login --no-include-email)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWS CLI V1 also supports get-login-password and has get-login marked as deprecated.

I'd be keen for us to drop this entirely; we can do a major version increment if need be. I'm not sure which V1 version added get-login-password but I think it's been around for years at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that simplifies it a lot in that case. Will push an update shortly

}

get_ecr_region() {
echo "${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_REGION:-${AWS_DEFAULT_REGION:-eu-west-1}}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've used eu-west-1 for consistency across the ECR plugins

@renkoh renkoh requested a review from 72636c February 21, 2022 05:44
Copy link
Member

@72636c 72636c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇

@renkoh renkoh merged commit 55c2f53 into master Feb 22, 2022
- docker#v3.8.0
```

#### Specifying a region
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README 😍

@72636c 72636c deleted the aws-cli-v2-support branch February 22, 2022 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants