使用Teamcity Kotlin DSL触发

Pat*_*čin 2 teamcity kotlin teamcity-10

我在Kotlin中定义了Teamcity工作,我想添加一个触发器.

我用了:

buildType {
    triggers {
        trigger {
            type = "VCS Trigger"
            enabled = true
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但这导致了 未知构建触发器

我应该使用什么定义来实现适当的VCS触发器

Pat*_*čin 6

我找到了使用vcs指令的方法.

注意,您必须导入触发器类

buildType {
    triggers {
        vcs {

        }
    }
}
Run Code Online (Sandbox Code Playgroud)