How To...
In this section:
Integrate with an issue tracker
You can turn issue ID references in change comments into links. Please see Mapping External Links in Comments for configuration instructions.
Share the build number for builds in a chain build
Suppose you have build configurations A and B that you want to build in sync: use same sources and take the same build number. Solution: Create a build configuration C and create snapshot dependencies A on C and B on C. Now when you have snapshot dependencies you can refer to the build number pattern of A and B to the build number of build C. Use the substitution pattern:
%dep.<btID>.system.build.number%
Where <btID> is the internal ID of the build configuration C. Please refer to the Build Configuration page for description of how to determine build configuration ID.
Predefined Properties on dependency properties.
We plan to provide more option on build number sharing. Please watch/comment on TW-7745.
Use an external tool that my build relies on
Assume, to run a build you need to use specific external tool to be installed on a build agent. To solve the problem, you have the following options:
Check in the tool into the version control and use relative paths.
Create a separate build configuration with a single "fake" build which would contain required files as artifacts, then, use artifact dependencies to send files to the target build.
Install and register the tool in TeamCity:
Install the tool on all the agents that will run the build.
Add
env.
orsystem.
property intobuildAgent.properties
file (or add environment variable to the system).Add agent requirement for the property in the build configuration.
Use the property in the build script.
Add environment preparation stage into the build script to get the tool form elsewhere.
Install Multiple Agents on the Same Machine
See instructions at Setting up and Running Additional Build Agents.
Change Server Port
To change the server's port, in the < TeamCity Home >/conf/server.xml
change the port number in the HTTP/1.1 connector:
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" enableLookup="false" useBodyEncodingForURI="true" />
To apply changes, you should restart server.
Make temporary build files erased between the build
Update your build script to use path stored in ${teamcity.build.tempDir
} (Ant's style name) property as the temp directory. TeamCity agent creates the directory before the build and deletes it right after the build.
Force creating System Administrator account
Since TeamCity 4.5 If there is no system administrator account in your current authentication scheme, to create one proceed as follows:
access directly the following URL:
http://<your_TeamCity_server>/setupAdmin.html
create new account (it should not match any existing user account in the system) for the System Administrator role.
Ho do I clear build queue if it got too many builds due to a configuration error
Try pausing the build configuration that has the builds queued. On build configuration pausing all its builds are removed form the queue.