I have an SBT project and a CD pipeline, and I want to complete the following sequence of steps:
- Checkout my project from git repo
- Mark commit
- Run tests
- Application package
Now at this point I don’t want to release anything, as I will push the binaries to another environment to run end-to-end tests. Only if they are completed successfully, I want to click the git tags and upload my artifact to the remote artifact repository. What I really want to achieve is to start first sbt prepereRelease, after which I will promote my testing environment, and later, if everything goes well, start it sbt doRelease. So I want something similar in my build.sbt:
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion
)
commands += Command.command("prepareRelease")((state:State) => {
val newState = Command.process("release",state)
println("Release called from prepareRelease...")
newState
})
releaseProcess := Seq[ReleaseStep](
publishArtifacts,
setNextVersion,
commitNextVersion,
pushChanges
)
commands += Command.command("doRelease")((state:State) => {
val newState = Command.process("release",state)
println("Release called from doRelease...")
newState
})
, , release sbt-release releaseProcess - , , . , , releaseProcess , , .