-
Notifications
You must be signed in to change notification settings - Fork 3
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 for multiple CodeArtifact repositories? #2
Comments
Hey @jfly, thanks for submitting this issue! I've pushed up an implementation of this to the
Or using your sample configuration with some tweaks: [codeartifact]
# 30 minutes
token_duration = 1800
profile_name = global-profile
[codeartifact domain="domain1" account="999999999999" region="us-west-2" name="domain1-dev"]
profile_name = domain1-dev
[codeartifact domain="domain1" account="999999999999" region="us-west-2" name="domain1-prod"]
profile_name = domain1-prod If you'd like to give it a try yourself, you can install it with this
|
I've added some unit testing around this functionality and released it as 1.3.0 in 46e83fe. Let me know if it works for you! |
Thanks, @jmkeyes! |
The current configuration options don't seem to be nuanced enough to support multiple CodeArtifact repositories at once.
It looks like this would be a straightforward change (at the time we load the config, we already know the url of the repository we're dealing with).
Would you be open to adding more granularly scoped configuration options? I'm not terribly familiar with ini files, but one way of doing this would be with more sections:
In the above example, the names of the sections don't really matter, they just need to be unique. An alternative would be to jam these urls into the section names (for example
[codeartifact.https://domain1-999999999999.d.codeartifact.us-west-2.amazonaws.com/pypi/domain1-prod/simple/]
), but that feels a little ugly/unwieldy IMO.This would be backwards compatible with the existing options, but would take precedence if the url matches one of these subsections.
If you're open to this, I'd be happy to send in a PR implementing it.
(tangentially related: jaraco/keyring#682)
The text was updated successfully, but these errors were encountered: