Kotlin DSL: Get affected changsets?

Is it possible to get the changesets that triggered the build from within a BuildType? I want to change my build steps based on what changed. 

0
1 comment

Unfortunately this is not (directly) possible as of now. When the Kotlin DSL code is imported into TC, it's compiled and verified, then its changes get applied to the regular configurations. Changing what is going to run is not possible based on the changesets in TeamCity at all directly, so it's also not possible via the DSL.

However, there might be an option. https://blog.jetbrains.com/teamcity/2017/01/kotlin-configuration-scripts-creating-configuration-scripts-dynamically/

Following this blog post, you can create a relatively large amount of custom build configurations. Create one of them for each of the different pipelines you would like to follow, then configure the VCS Trigger on each one to only be triggered by the appropriate type of changes (path/branch).

0

Please sign in to leave a comment.