JetBrains / teamcity-pipelines-dsl

Experimental Kotlin DSL library for TeamCity pipelines
Apache License 2.0
40 stars 20 forks source link

dependsOn(parallel) with onDependencyFailure ignored #6

Open pschuermann opened 5 years ago

pschuermann commented 5 years ago

I'm trying to setup a dependency like this, so that the last build(Package) in the sequence doesn't start if any of its dependencies failed.

Issue: The config is valid but the onDependencyFailure is ignored and doesn't end up in the generated XML.

    var par = Parallel() 
    sequence {
        build(Compile) {
            produces("application.jar")
        }
        par = parallel {
            build(Test) {
                requires(Compile, "application.jar")
                produces("test.reports.zip")
            }
            sequence {
                build(RunInspections) {
                   produces("inspection.reports.zip")
                }
                build(RunPerformanceTests) {
                   produces("perf.reports.zip")
                }
            }   

        }
        build(Package) {
            requires(Compile, "application.jar")
            produces("application.zip")
            dependsOn(par){
                onDependencyFailure = FailureAction.FAIL_TO_START // <--- don't want to Package if any build in parallel failed
            }
        }
    }

By default the dependency is setup with RUN_ADD_PROBLEM