You are viewing the documentation of TeamCity 2018.x, which is not the most recently released version of TeamCity.
Go to the latest TeamCity documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Key

Prepare the conf/buildAgent.properties file (set agent name there, at least)

Make sure that all files under the buildAgent directory are owned by your_build_user to ensure a proper agent upgrade process.

Start the build agent via bin/agent.sh start command and make sure it upgrades successfully on the first start. This may require a couple of minutes, see buildAgent/logs/teamcity-agent.log for progress.

Create a command file $HOME/start_build_agent.command which contains one line:

Code Block

language

bash

/path/to/buildAgent/bin/agent.sh start

Add this command file into Login Items via UI or use the following command from the Terminal app:

Code Block

language

bash

osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Users/your_build_user/start_teamcity_agent.command", hidden:false}'

Configure your Mac system to automatically login as a build user, as described here

Reboot

On the system startup, the build user should automatically log in, and the build agent should start from the Terminal app (you can close it after that).

To stop build agent, use the usual /path/to/buildAgent/bin/agent.sh stop command