Ubuntu 12.04 TeamCity build agent installation

Download build agent archive from your TeamCity server:

wget http://your_teamcity.server.com:8111/update/buildAgent.zip

Unzip it in separate directory:

mkdir buildAgent

^
mv buildAgent.zip buildAgent
^
cd buildAgent
^
unzip buildAgent.zip
^
chown -R your_user:your_group ../buildAgent

Copy agent's settings file:

cp conf/buildAgent.dist.properties conf/buildAgent.properties

Edit this file:

nano conf/buildAgent.properties

There are fields which you must update:

# your TeamCity server address:
serverUrl=http://your_teamcity.server.com:8111/
 

# buildAgent's name, which would displayed on Agents page in your TeamCity server UI:
name=ubuntu_build_agent

 
# this field  leave blank, agent fill it after first connect to server:
authorizationToken=

Make bin files executable:

chmod u+x bin/*.sh

Build agent usage:

$ ./bin/agent.sh

  JetBrains TeamCity Build Agent
  Usage:
  ./bin/agent.sh start     - to start build agent in background
  ./bin/agent.sh stop      - to stop build agent after current build finish
  ./bin/agent.sh run         - to start build agent in the current console
  ./bin/agent.sh stop force  - to stop build agent terminating currently running build

Add build agent to rc.local for autostart after system reboot:

/home/your_user/buildAgent/bin/agent.sh start
konjoot Over 10 years ago