Upgrade
In this section
Upgrading the TeamCity Server:
Upgrading Build Agents:
Licensing Issues
Upgrades to TeamCity versions up to versions 4.x are free of charge. Please note that TeamCity 4.x uses new licensing policy comparing to that of previous TeamCity versions. Please review the new Licensing Policy.
Upgrading Using a Windows Installer
Shut the server down.
Shut the agent down if it was installed from the TeamCity installation package.
Locate the .BuildServer folder on the disk and TeamCity Data Backup of this folder (usually this folder is created in the home directory of the user under which the TeamCity server is running).
Back up the configuration files in the TeamCity installation folder if you modified them or installed custom plugins.
Uninstall the previous installation using Add or Remove Programs.
Run the new installer. When prompted, specify the <TeamCity data directory> used by previous installation.
If you use an external database put the appropriate driver jar into the
<TeamCity home dorectory>/ROOT/WEB-INF/lib
directory.If you use custom plugins, put their jars into
<TeamCity installation folder>/ROOT/WEB-INF/lib
for server-side plugins and into<home directory>/ROOT/update/plugins
for build agent plugins.Start up the TeamCity server (and agent if it was installed together with the installer).
If your project contains build configurations related to
*.ipr
and inspections, you are required to update and correct the build configuration settings. To do it, visit the build configuration page/build runner section. The first visit to this page may take time, because TeamCity will download and analyze all the project module (*.iml
) files to detect which global libraries, path variables, jdk, etc. are used. Subsequent visits will be much faster. Review the settings and make sure that all the settings are correct.
Manual Upgrading on Linux and for WAR Distributions
Shut the server down.
Locate the <TeamCity data directory> on the disk and TeamCity Data Backup of this folder (usually this folder is created in the home directory of the user under which the TeamCity server is running).
Back up old TeamCity files (either the whole TeamCity directory or
[TOMCAT_HOME]/webapps/TeamCity/*
if you are installing from a war file).Remove old installation files (either the whole TeamCity directory or
[TOMCAT_HOME]/webapps/TeamCity/*
if you are installing from a war file).Unpack the new archive where TeamCity was previously installed.
If you use an external database put the appropriate driver jar into the
WEB-INF/lib
directory.If you use custom plugins, put their jars into
ROOT/WEB-INF/lib
for server-side plugins and intoROOT/update/plugins
for build agent plugins.Specify additional TeamCity Startup Properties, if required.
Start up the TeamCity server.
If your project contains build configurations related to
*.ipr
and inspections, it is required to update and correct build configuration settings. To do it, visit the build configuration page/build runner section. The first visit to this page may take time, because TeamCity will download and analyze all project module (*.iml
) files to detect used global libraries, path variables, jdk and so on. Subsequent visits will be much faster. Look through the settings and make sure that all settings are correct.
All the configuration data and database scheme will by updated by our converters upon the first startup after the upgrade.
Automatic Build Agent Upgrading
In TeamCity 4.0 (like in TeamCity 3.0), the core components and plugins for build agents are updated automatically. When the TeamCity server is upgraded, agents will automatically update themselves. The agent (agent.bat
, agent.sh
, or agent service) will download the latest agent upgrade from the TeamCity server. When the download is complete and the agent is idle, it will start the upgrade process (the agent is stopped, the agent files are updated, and agent is restarted). This process may take about five minutes. It is important not to interrupt the upgrade process, doing so may cause the upgrade to fail and the agent will need to be manually reinstalled.
Upgrading Build Agents to 4.0
When upgrading to TeamCity 4.0 for the first time there are two parts of the agent that need to be upgraded manually: the Windows service wrapper and the agent launcher. The easiest way to upgrade an agent is uninstall current build agent and then install the newer one.
Upgrading Build Agent Launcher
You only need to perform this step if you do not want to uninstall and then install the agent again, which is the preferred way of agent upgrade.
Agent launcher is the process that is first started for the agent and manages other child processes that actually connect to the server and perform the build.
Wait till agent is upgraded automatically.
Check
<agent>\lib\latest
folder. If it does not exist, no further steps are needed, you have the latest launcher version installed.Stop agent.
Move content of the
<agent>\lib\latest
folder to the<agent>\lib
folder, overwriting existing files, if needed.Start the agent.
Upgrading the Build Agent Windows Service Wrapper
Upgrading from TeamCity version 1.x
Version 2.0 of TeamCity migrated to new way of managing Windows service (service wrapper) for the build agent: Java Service Wrapper library.
One of advantages of using new service wrapper is ability to change any JVM parameters of the build agent process.
1.x versions installed Windows service under name agentd, while 2.x versions use TeamCity Build Agent Service <build number> name.
The service wrapper will not be migrated to new version automatically. You do not need to use the new service wrapper, unless you need its functionality (like changing agent JVM parameters).
To use new service wrapper you should uninstall old version of the agent (with Control Panel | Add/Remove Programs) and then install a new one.
If you customized the user under which the service is started, do not forget to customize it in the newly installed service.
Upgrading from TeamCity version 2.x
If the service wrapper needs an update, the new version is downloaded into the <agent>/launcher.latest
folder, however the changes are not applied automatically.
To upgrade the service wrapper manually, do the following:
Ensure the
<agent>/launcher.latest
folder exists.Stop the service using
<agent>\bin\service.stop.bat
.Uninstall the service using
service.uninstall.bat
.Backup
<agent>/launcher/conf/wrapper.conf
file.Delete
<agent>/launcher
.Rename
<agent>/launcher.latest
to<agent>/launcher
.Edit
<agent>/launcher/conf/wrapper.conf
file. Check that the'wrapper.java.command'
property points to thejava.exe
file. Leave it blank to use registry to lookup for java. Leave 'java.exe' to lookupjava.exe
in PATH. For a standalone agent the service value should be../jre/bin/java
, for and agent installation on the server the value should be../../jre/bin/java
. The backup version ofwrapper.conf
file may be used.Install the service using
<agent>\bin\service.install.bat
.Make sure the service is running under the proper user account. Please note that using SYSTEM can result in failing builds which use MSBuild/Sln2005 configurations.
Start the service using
<agent>\bin\service.start.bat
.