DSL Pipelines with SVN as VCS Repository
Completed
Hi,
We are planning to use Kotlin DSL to write our build configuration pipelines. Our VCS is SVN, and the DSL gets stored to the root of the SVN repository under the ".teamcity" folder.
When creating a configuration in TC we load the settings.kts file that has the checkout rules hard coded. Is there a way I can parameterize these so that I can setup multiple build configurations from the settings.kts file for multiple branches driven by different checkout rules.
Regards
Rajesh
Please sign in to leave a comment.
Hi Rajesh,
As I understood, you would like to have different checkout rules for different branches in the same configuration, and you would like the checkout rules to be based on parameters. You can achieve that using DSL Context Parameters. Please see this page for more details.
-Anatoly
Register for TeamCity Technology Day - Nov 5th
Hi Anatoly,
Thanks for the information and was really helpful.
On another note, wanted to know on how a Suitable build is picked up in a build chain for the below scenario
SVN Repo : Trunk
Build Configuration A with checkout rules as Trunk/Common
Build Configuration B with checkout rules as Trunk/App
Build Configuration C with checkout rules as Trunk/Web
If the build chain is setup as A --> B --> C and when a check-in is made in Trunk/Web (which effects only Build Configuration C) and a build is triggered does it trigger the entire chain as they all belong to the same repository. I do have the "Enable Revision Sync" option unchecked in the snapshot dependency
NOTE: All the build configurations are part of a subproject that has the same VCS Root (svn) but different checkout rules. The current behaviour we are observing is that it trigges all 3 builds when a file is checked in "Trunk/Web" or if the settings.kts files is modified at the root of the VCS.
-Rajesh
Hi Rajesh,
Configurations A or B will not get rebuilt. TeamCity takes the checkout rules into account. It will treat an older revision equivalent to the current revision when the current revision doesn't modify the files checked out by the build configuration.
-Anatoly
Register for TeamCity Technology Day - Nov 5th