8 comments

Hello,

Could you please detail your question? It's not clear what you mean.

0

1. I have a value in a build configuration parameter
2. I need to write this value to an element of a XML file, when performing TeamCity build

0

Thank you for details. There is no special feature to write parameter to XML files.
You can write a script that search needed element and replace the value.  Then use TeamCity command line build step to run it. For example see http://stackoverflow.com/questions/18212285/shell-script-for-the-changing-the-element-of-xml.

0

That's what I was afraid of :)
It would be nice to have a built-in feature for this task.

0

Well, technically, there is.
You could use the File Content Replacer build feature for this.

https://confluence.jetbrains.com/display/TCD9/File+Content+Replacer

There is probably quite a bit of work involved in getting it to work as you wish though.

0

Thomas, you are right, File Content Replacer could be configured for this. Thank you for the advice!

0

Thanks, but I'd better stick to the script solution. It looks simpler.

0

Please sign in to leave a comment.