Upgrade
Before upgrading TeamCity:
Review what you will get by reviewing What's New in TeamCity 7.1 (follow links at the bottom of What's New if you are upgrading not from the previous major release)
Download new TeamCity version
Carefully review the Upgrade Notes
To upgrade the server:
If you plan to upgrade a production TeamCity installation, it is recommended to install a How To... and checking it's functioning in your environment before upgrading the main one.
Licensing
Before upgrading please make sure the maintenance period of your licenses is not yet elapsed (use Administration | Licenses TeamCity server web UI page to list your license keys). The licenses are valid only for the versions of TeamCity with the effective release date within the maintenance period. See the effective release date at the Previous Releases Downloads.
Please note that TeamCity versions 5.0 and above use licensing policy different from that of previous TeamCity versions. Please review the Licensing Policy page and the Licensing and Upgrade section on the official site. If you are evaluating the newer version, you can get an evaluation license on the download page. Please note that each TeamCity version can be evaluated only once. To extend the evaluation period, please contact JetBrains sales department.
Upgrading TeamCity Server
TeamCity supports upgrades from any of the previous versions to the current one. Downgrades are not supported unless specifically noted. On upgrade, all the configuration settings and other data are preserved unless noted in Upgrade Notes.
Upgrading Using Windows Installer
TeamCity Data Backup. Ensure you have configuration files and database data backed up.
If you have any of the Windows service settings customized (like server Installing and Configuring the TeamCity Server), store them to later repeat the customizations.
Run the new installer. Confirm uninstalling the previous installation. When prompted, specify the <TeamCity data directory> used by the previous installation.
Make sure you have the external database driver Setting up an External Database (this applies only if you use external database).
Configuring TeamCity Server Startup Properties any customizations of Windows services that you need
Start up the TeamCity server (and agent, if it was installed together with the installer).
Review the TeamCity Maintenance Mode page to make sure there are no problems encountered, and confirm the upgrade by clicking corresponding button. Only after that all data will be converted to the newer format.
Manual Upgrading using .tar.gz or .war Distributions
TeamCity Data Backup. Ensure you have configuration files and database data backed up.
Remove old installation files (the entire TeamCity home directory or
[TOMCAT_HOME]/webapps/TeamCity/*
if you are installing from a war file). It's advised to backup the directory beforehand.Unpack the new archive to the location where TeamCity was previously installed.
If you use Tomcat server (your own or bundled in .tar.gz TeamCity distribution), it is recommended to delete content of the
work
directory. Please note that this may affect other web applications deployed into the same web server.Make sure you have the external database driver Setting up an External Database (this applies only if you use external database).
If you use custom plugins that do not reside in <TeamCity Data Directory>, Installing Additional Plugins.
Specify additional Configuring TeamCity Server Startup Properties, if required.
Start up the TeamCity server.
Review the TeamCity Maintenance Mode page to make sure there are no problems encountered, and confirm the upgrade by clicking corresponding button. Only after that all the configuration data and database scheme are updated by TeamCity converters.
Upgrading Build Agents
Upgrading-Build-Agent-Launcher
Automatic Build Agent Upgrading
On starting newer TeamCity server, TeamCity agents connected to the server are updated automatically. 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 several minutes depending on the agent hardware and network bandwidth. Do not interrupt the upgrade process, as doing so may cause the upgrade to fail and you will need to manually reinstall the agent.
If you see that an agent is identified as "Agent disconnected (Will upgrade)" in the TeamCity web UI, do not close the agent console or restart the agent process, but wait for several minutes.
Various console windows can open and close during the agent upgrade. Please be patient and do not interrupt the process until the agent upgrade is finished.
Upgrading Build Agents Manually
All connected agents upgrade automatically, provided they are correctly Setting up and Running Additional Build Agents, so manual upgrade is not necessary.
If you need to upgrade agent manually, you can follow the steps below:
As TeamCity agent does not hold any unique information, the easiest way to upgrade an agent if to
back up
<Agent Home>/conf/buildAgent.properties
file.uninstall/delete existing agent.
install the new agent version.
restore previously saved
buildAgent.properties
file to the same location.start the agent.
If you need to preserve all the agent data (e.g. to eliminate clean checkouts after the upgrade), you can:
stop the agent.
delete all the directories in the agent installation present in the agent .zip distribution except
conf
.unpack the .zip distribution to the agent installation directory, skipping the "conf" directory.
start the agent.
In the latter case if you run agent under Windows using service, you can also need to upgrade Windows service as described Upgrading-from-TeamCity-version-2.x.
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
.