I'm a newbie for scala.
I used sbt-release to control release process and sbt-docker to build/publish a docker image.
I can release a specific version via sbt release
and build/publish a docker image via sbt docker
or `sbt dockerBuildAndPush'
If I wanna release a specific version, I need to
- execute
sbt release
- remember the release version and modify docker image tag with the release version
- execute
sbt dockerBuildAndPush
But it's so tedious...
I wanna add build/publish docker image into release process.
For example:
I define my release process in build.sbt
val publishDocker = ReleaseStep(action = st => {
// 1. get release version from sbt-release
// 2. add release version to docker image tag
// 3. push docker image to aws ecr
})
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishDocker,
setNextVersion,
commitNextVersion,
pushChanges
)
But I have no idea how to implement publishDocker function.
Thanks for your help~