![]() ![]() Use the same settings as in the parent project (default).Įnable synchronization. Here you can choose one of the following options: The " Enable/disable versioned settings" permission is required (default for the System Administrator role). To enable it, go to Project Settings | Versioned Settings | Configuration. teamcity directory in the root of the VCS repository, in the same format as in the TeamCity Data Directory.īy default, the synchronization of the project settings with the version control system is disabled. The versioned settings are stored in the. You can store project settings in the XML format or in the Kotlin language and define settings programmatically using the Kotlin-based DSL. Supported VCSs are Git, Mercurial, Perforce, Subversion, and Azure DevOps Server (formerly TFS). TeamCity allows synchronizing project settings with the version control repository (VCS). ![]() This is the general idea but not complete, by spending time getting this script out of the way you'll save a lot of time managing it via TeamCity UI.Storing Project Settings in Version Control Set the agent requirement on the build configurations.įor each build configuration, in each project, set the agent requirements on the build configuration using the parsed out XX_VERSION value curl -X PUT -user username:password.Loop over all projects, get all parameters and parse our XXX_VERSION curl Get the XXX_VERSION parameter from the projects.Get the list of projects curl -i -H "Accept: application/json" -user username:password You'll write a single script (in whatever scripting language you're comfortable using) that you can run once to set all the agent requirements. In this case, I think it would be worth your time to write a script to avoid having to go through the UI to update all the build configurations you mentioned. You can interact with the API using your preferred scripting language using HTTP GET/PUT calls to get and update values. Why not automate this using TeamCity's REST API? TeamCity's server has a built in HTTP API that you can use to edit/update (almost) any of the fields you would be able to using the web interface. It seems like you already know what you want to do and the issue is the large number of agents and configurations that you need to deal with. (Today, all our agents includes all possible versions of the software, but will no longer be possible, so we will need requirements on the agents from the projects of build configurations) But given the number of build configurations and the number of variant projects, I would prefer to parameterize the requirement on the value of the exiting env.XXX_VERSION. Now I also would like to include an agent requirement from all the relevant build configurations in the project so only the usable agents will be considered. (Over time we make copies of this build project for different variants of some of the products we depend on, so we now have 12 different projects with different values for the parameters). ![]() We can then use this value in the relevant build scripts of the project. can value include %.% substitutions?Īn example: we have a project parameters env.XXX_VERSION which specifies the needed version of the XXX product in all the build configurations of the project. In TeamCity, is it possible to parameterize the agent requirements based on project or build configuration parameters? E.g. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |