Icon

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.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Install a build agent on a Mac via buildAgent.zip
  • 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
    languagebash
    /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
    languagebash
    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

 

LaunchAgent approach

To configure an automatic build agent startup via LaunchAgent, follow these steps:

...

    • Install the second build agent in a different directory

    • In conf/buildAgent.properties, you should specify an unique name for the build agenta different name and port

    • In the $HOME/start_build_agent.command (see details above), add a line to start the second build agent 

...