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

耗尽温柔 提交于 2020-01-01 10:12:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!