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

AWS CLI Verison 2 support #40

Merged
merged 3 commits into from
Mar 5, 2020
Merged

AWS CLI Verison 2 support #40

merged 3 commits into from
Mar 5, 2020

Commits on Mar 4, 2020

  1. prepare tests & code path for awscli v2; not yet implemented

    This commit adds the foundations to version-check awscli for
    ecr get-login-password support, and send that down a different code
    path. However the implementation is currently the same, and will not
    work for awscli v2+
    pda committed Mar 4, 2020
    Configuration menu
    Copy the full SHA
    75c1c90 View commit details
    Browse the repository at this point in the history
  2. awscli v2 support: use 'aws ecr get-login-password'

    For awscli >= 1.17.10 we now use `aws ecr get-login-password` instead of
    the deprecated (removed in 2.0.0) `aws ecr get-login`.  As a result, we
    need to build the registry address, which means determining the AWS
    region and account ID.
    
    If the AWS region is not specified in the existing plugin config
    options, AWS_DEFAULT_REGION is used, which default to us-east-1.
    
    If the AWS account ID is not specified in the existing plugin config
    options, it is (hopefully) found with `aws sts get-caller-identity`.
    pda committed Mar 4, 2020
    Configuration menu
    Copy the full SHA
    509678c View commit details
    Browse the repository at this point in the history
  3. Specify region in 'aws ecr get-login-password'

    Otherwise AWS_DEFAULT_REGION (which defaults to us-east-1) is always
    used for 'aws ecr get-login-password', but 'docker login' runs
    against the region specified by plugin config. If they differ, the
    docker login fails.
    
    Leaving region completely unspecified produces a warning, but still
    defaults to us-east-1 for compatibility.
    pda committed Mar 4, 2020
    Configuration menu
    Copy the full SHA
    6a39e7e View commit details
    Browse the repository at this point in the history