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
set -x AWS_PROFILE default # replace | |
set -x AWS_REGION us-east-1 # replace | |
set -x CODEARTIFACT_DOMAIN foo # replace | |
set -x CODEARTIFACT_DOMAIN_ID 123456789 # replace | |
set -x CODEARTIFACT_REPOSITORY somepypi # replace | |
function codeartifact_login | |
set -Ux CODEARTIFACT_TOKEN (aws --profile $AWS_PROFILE codeartifact get-authorization-token --domain $CODEARTIFACT_DOMAIN --domain-owner $CODEARTIFACT_DOMAIN_ID --query authorizationToken --output text) | |
set -Ux PIPENV_PYPI_MIRROR "https://aws:$CODEARTIFACT_TOKEN@$CODEARTIFACT_DOMAIN-$CODEARTIFACT_DOMAIN_ID.d.codeartifact.$AWS_REGION.amazonaws.com/pypi/$CODEARTIFACT_REPOSITORY/simple/" | |
end |