sbt-ecr icon indicating copy to clipboard operation
sbt-ecr copied to clipboard

Allow profile to be set via system property as an alternative

Open neowulf opened this issue 7 years ago • 1 comments

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"))
}

neowulf avatar Mar 23 '17 21:03 neowulf

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!

sjednac avatar Mar 25 '17 10:03 sjednac