Closed jtweed closed 7 years ago
We’re already creating tagged images: for example, this is what I have locally:
$ docker images | grep wellcome/platform | awk '{print $2}'
v0.1.2-SNAPSHOT
v0.1.1-SNAPSHOT
latest
But if I do an ecr:push
, I don’t see it showing up – it could be that it’s only pushing latest
, but I don’t think that would explain why new Circle builds (which don’t have old images lying around) aren’t pushing images with a non-latest tag.
Suspect the following change might work:
https://github.com/wellcometrust/platformprototype/blob/master/platform-api/build.sbt#L94:
// repositoryName in ecr := name.value
// Try this instead:
repositoryName in ecr := s"${name.value}:${version.value}"
Because:
https://github.com/sbilinski/sbt-ecr/blob/master/src/main/scala/sbtecr/EcrPlugin.scala#L52
That was disappointingly simple, but it works.
This was based on the old version of the application and it works, doing this for the Finatra stuff is a separate task.
Current project makes use of https://github.com/sbt/sbt-git to version assets.
Currently the
sbt ecr:push
step (circle.yml L36) will push to the "latest" label/tag in ECR.Really it should push to a label matching the version in
build.sbt
.