Interacting with Team City server from build script

What I learned today — 23 February 2018

Niel de Wet
1 min readFeb 26, 2018

Team City allows certain interactions with the server by printing specially formatted messages to the build log. For example, one may set a build parameter to reuse in a later build step, or even in a dependent build configuration! On a Linux build agent one does it this way:

echo "##teamcity[setParameter name='env.MY_ENVIRONMENT_VARIABLE' value='${someVariableInScript}']"

This is just one example. There are many other ways to interact with the server, like reporting unsupported tests, coverage, inspections, build progress, problems and status.

--

--

No responses yet