sbt-ecr
sbt-ecr copied to clipboard
Allow profile to be set via system property as an alternative
Although, it's nice to execute:
AWS_DEFAULT_PROFILE="sandbox" sbt ecr:createRepository
it'd be nice to have an alternative to execute:
sbt -Daws.profile=sandbox ecr:createRepository
This also has a nice property that the build can be configured via the initialize sbt task which prevents for users to specify the profile by default if not found.
initialize ~= { _ =>
System.setProperty("aws.profile", sys.props.getOrElse("aws.profile", "sandbox"))
}
This could be a nice extension indeed. The main issue I'm seeing are priorities for the config - we should probably keep the same order as in the authentication chain.
I'll do some research on the existing conventions and I'll get back to you. Thanks for the contribution!