Created
June 21, 2019 18:42
-
-
Save ivanobulo/ae9979c4cda77caf04a7d961681778c2 to your computer and use it in GitHub Desktop.
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
lazy val ecrGetLogin = taskKey[Unit]("Login to ECR") | |
ecrGetLogin in ThisBuild := { | |
val os = new java.io.ByteArrayOutputStream | |
(s"aws ecr get-login --no-include-email --registry-ids ${ecrCallerId.value}" #> os).! | |
os.close() | |
// this will run 'docker login ...' that 'aws ecr get-login' have returned | |
os.toString.! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment