Is it possible to edit settings.kts without triggering all build configurations in a build chain?

We use Versioned Settings with Kotlin and "use settings from VCS". Our project has a Build Chain with snapshot and artifact dependencies across multiple build configurations. We then use custom Checkout Rules for each build configuration in the chain so it only triggers when changes in the Git repository affect that specific build configuration. This is important because each build configuration takes hours to complete so we want to minimize how often they have to build. The problem is that changing a build configuration's settings in settings.kts is seen as a change to all build configurations and thus all build configurations require a build.

Is there a different way to use Kotlin Versioned Settings so that changes to one build configuration's settings does not trigger all other build configurations in the build chain?

0
1 comment

Hi!

If I understand correctly, you only have one settings.kts file? Perhaps you could avoid triggering all builds if you have multiple files instead. TeamCity should do it automatically when a project becomes large enough, as explained here:

If you choose to generate portable DSL scripts and the current project comprises less than 20 entities, TeamCity will create one settings.kts file to define them all. Individual entities include projects, build configurations, templates, and VCS roots.
If there are more than 20 entities in the project, TeamCity will create a hierarchy of separate .kt files to define and group these entities.

However, you can also create your own structure, as explained in this comment of a related question:

https://teamcity-support.jetbrains.com/hc/en-us/community/posts/4403541518610/comments/4403671122834

0

Please sign in to leave a comment.