Icon

You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.1 documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 
Skip to end of metadata
Go to start of metadata

In TeamCity a build agent contains two processes:

  • Agent Launcher — a Java process that launches the agent process
  • Agent — the main process for a Build Agent; runs as a child process for the agent launcher

Whether you run a build agent via the agent.bat|sh script or as a Windows service, at first the agent launcher starts and then it starts the agent.

Icon

You do not need to specify any of the options unless you are advised to do by the TeamCity support team or you know what you are doing.

In this section:

Agent Properties

For both processes above you can customize the final agent behavior by specifying system properties and variables for the agent to run with.

Build Agent Is Run Via Script

Before you run the <Agent Home>\bin\agent.bat|sh script, set the following environment variables:

  • TEAMCITY_AGENT_MEM_OPTS — Set agent memory options (JVM options)
  • TEAMCITY_AGENT_OPTS — additional agent JVM options

Build Agent Is Run As Service

In the <Agent Home>\launcher\conf\wrapper.conf file, add the following lines (one per option):

Icon
  • You should add additional lines before the following line in the wrapper.conf file:
  • Please ensure to re-number all the lines after the inserted ones.

Agent Launcher Properties

It's rare that you would ever need these. Most probably you would need affecting main agent process properties described above.

Build Agent Is Run Via Script

Before you run the <Agent Home>\bin\agent.bat|sh script, set the TEAMCITY_LAUNCHER_OPTS environment variable.

Build Agent Is Run As Service

In the <Agent Home>\launcher\conf\wrapper.conf file, add the following lines (one per option, the N number should increase):

Icon

Make sure you re-number all the lines after the inserted ones.



See also:

  • No labels