Linux Mint 14 64bit
TeamCity Version 7.1.4 (build 24331)
TeamCity is a user-friendly continuous integration (CI) server for developers and build engineers. It is trivial to setup, manage and use.
It scales perfectly for a company or a team of any size. And importantly it is absolutely free for small teams.
Download latest TeamCity version from here. You can either choose free professional edition or enterprise edition with 60 days trial.
Unzip/extract the downloaded file to directory where TeamCity will be installed, I’ve mine extracted to “/usr/sw/TeamCity/”.
Change the owner of installation directory from root to user. And create a directory named ‘logs’ if it doesn’t exists inside TeamCity installation directory and assign appropriate permissions. The logs directory will contain all log files generated by TeamCity. These logs will be very helpful if something goes wrong.
2.3. Auto/Manual start
Next, we can create a init script that’ll start the TeamCity when system’ll boot.
The script iteself is simple and basic, contains start and stop command for TeamCity.
#!/bin/sh # /etc/init.d/teamcity - startup script for teamcity export TEAMCITY_DATA_PATH="/var/TeamCity/.BuildServer" case $1 in start) start-stop-daemon --start --exec /usr/sw/TeamCity/bin/teamcity-server.sh start ;; stop) start-stop-daemon --start --exec /usr/sw/TeamCity/bin/teamcity-server.sh stop ;; esac exit 0
This init script should be updated and register to system. Now TeamCity will start automatically everytime the daemon starts.
sudo update-rc.d teamcity defaults
Or, we can run TeamCity by executing commands in terminal. By executing the command “./teamcity-server.sh start” from will start the TeamCity server.
$ /usr/sw/TeamCity/bin/./teamcity-server.sh start
2.4 Create user and project
Since, it’s first time TeamCity is running, configuration will take sometime, so have patience.
When the configuration is done, it’ll ask you to create a administrator level user. Enter a username, password and confirm it, admin user is created.
Provide project name and description to create your first project. Creating project is first step but TeamCity won’t start building the project just yet. We need to add configuration that will checkout project from VCS, manage build artifact paths, build counter, build tool etc. It is called build agent in general.
2.5 Build Agent
A Build Agent is a piece of software that actually executes a build process. TeamCity can have numbers of these build agent as per team and project requirements.
2.5.1 General setting
2.5.2 Version Control Settings
Click ‘Create and attach new VCS root’ to setup in which version control system project is hosted, where and branch name that should be checkout for build.
Test connection if the TeamCity can find the mentioned VCS and project, and save the changes.
2.5.3 Build Steps
Save the changes.
For more on which execute steps to choose, look here
1. Running TeamCity with 64 bits JVM might lead to perm gem space issue. Either increase the perm gem size or refer to here