Trigger using Teamcity Kotlin DSL

1.6k views Asked by At

I have Teamcity job defined in Kotlin and I want to add a trigger.

I used:

buildType {
    triggers {
        trigger {
            type = "VCS Trigger"
            enabled = true
        }
    }
}

But this results to unknown build trigger

What definition should I use to have proper VCS trigger in place

1

There are 1 answers

1
Patrik Mihalčin On

I found the way to do it using vcs directive.

Note, you have to import trigger class

buildType {
    triggers {
        vcs {

        }
    }
}