Teamcity kotlin12/18/2023 ![]() However, it is recommended to update the Kotlin DSL scripts to use the most recent configs version. Usually, after the server upgrade, the Kotlin DSL scripts do not require any immediate changes and should produce the same result in the new TeamCity version. If there were any changes to projects configuration via the web interface while versioned settings were disabled, these changes will be committed to the VCS repository too when settings are enabled. This will make TeamCity commit converted XML configuration files to the VCS. If the server is a production installation, enable versioned settings using the action in the health report. This is done to prevent TeamCity from changing the settings in the version control if you upgrade a non-production copy of the TeamCity server. Enabling versioned settings after the upgradeĪfter a TeamCity upgrade, the versioned settings are disabled globally on the whole TeamCity server, and a corresponding health report is shown in the administration UI. Because of the lack of incompatible changes starting with TeamCity 2022.04 the DSL API version is considered redundant, and it is recommended to perform a switch to packages without this version. So several TeamCity versions after that still used the same v2019_2 package names for the newly generated DSL code. However, after TeamCity 2019.2 there were no incompatible changes. The new DSL API version is introduced when there are significant incompatible changes in DSL API. ![]() The v2019_2 part there corresponds to the TeamCity version when this DSL API was introduced. The DSL code generated by TeamCity before 2022.04 has the DSL API version encoded into the package name, for example: .v2019_2. When you upgrade your server to version 2022.04, TeamCity will execute your DSL and apply additional transformations to modify the settings according to the format expected by the newest version. For instance, your DSL scripts could be generated by TeamCity 2017.2 and have the version set to 2017.2. TeamCity uses this version to perform transformations after DSL execution to make resulting XML configuration files up-to-date with the current TeamCity version where they will be applied. This is the version specified in settings.kts, it looks like this: TeamCity cannot perform such a transformation of settings automatically without external data, so manual DSL code update is required. In TeamCity 2017.1, these settings were moved to the project level. For example, in TeamCity 10.0 the settings of the cloud integration were stored in a dedicated file which was not committed to a VCS. Some TeamCity settings changes require external information and cannot be performed automatically. Changes which cannot be performed automatically The DSL from the previous TeamCity version generates a parameter with the old name, but TeamCity can automatically replace the old parameter name with the new one after DSL execution. ![]() For example, some plugin implementing a build step may rename its parameters. It is recommended though to update the DSL to a newer configs version to reduce performance hit and make Kotlin scripts closer to the settings you see in the UI.Ī lot of changes in TeamCity settings fall into this category. These types of settings changes do not require changing the Kotlin DSL as the changes are applied by the server automatically on each settings regeneration from the DSL. Changes which can be performed automatically TeamCity settings format changesĪs far as the DSL is concerned, there are the following types of TeamCity settings changes. These recommendations are displayed as server health reports on the corresponding pages of the server administration UI. It is also recommended to update the Kotlin code to the latest config version. When settings are stored in Kotlin DSL, the Kotlin code might need to be changed to be still functional. During the first start after the server update, TeamCity converts XML settings files in the TeamCity Data Directory to the new format. The TeamCity XML settings format is usually changed in the major releases.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |