How to permanently change a system property in TeamCity 6 from a build step

4.6k Views Asked by At

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?

2

There are 2 best solutions below

0
On BEST ANSWER

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.

3
On

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.