问题
I have found a way to change a property in TeamCity:
##teamcity[setParameter name='ddd' value='fff']
But unfortunately this change only occurs for the current build. I want this change to be PERMANENT, but TeamCity only changes this for the current running build.
How do I make a permanent change to a system property in TeamCity?
回答1:
The only solution using TeamCity 6.5 was to edit the Xml configuration file programmatically using a python script.
A build step calls the python script to change the variable during each build.
回答2:
Use the REST API which is a feature of TeamCity 7.0
Api details here - http://confluence.jetbrains.com/display/TW/REST+API+Plugin#RESTAPIPlugin-BuildConfigurationAndTemplateSettings
I use this method to get and set properties from powershell during a build.
来源:https://stackoverflow.com/questions/9789030/how-to-permanently-change-a-system-property-in-teamcity-6-from-a-build-step