Kolin DSL: How do I specify SnapshotDependencyOptions in CompoundStep?
Answered
Hello
I've been trying to specify that I want the builds inside a parallel block to fail to start if their dependency fails, but I can't figure out the syntax.
sequential {
buildType(Build1())
parallel {
buildType(Build2())
buildType(Build3())
}
}
I would like Build2 and Build3 to fail to start if Build1 fails for whatever reason. I can't find any examples anywhere of a build doing this, and though the documentation says parallel can take a option argument with the SnapshotDependenciesOptions, no matter how I try to make this work, the produced XML is missing the specification in its dependencies block (XML produced after testing the build with maven) or it doesn't compile.
Better tutorials and docs for the Kotlin DSL are seriously needed.
Please sign in to leave a comment.
Figured it out after sleeping on it. The dependency options declared in a build chain like this are tied to the builds which depend on that build. So for my case:
This had the effect I wanted, in that Build2 and Build3 now have a snapshot dependency on Build1, and if Build1 fails to build, 2 and 3 fail to start.
I would think you would want to specify on the dependency options on the dependent builds, which is what threw me off.
Again, better Kotlin DSL documentation would probably help make this more clear.