After you have installed and started running TeamCity, it collects the information on builds, tests and so on and indexes it.
In TeamCity you can search builds by build number, tag, build configuration name and other different parameters specifying one or several keywords and use Lucene search query syntax to get more precise results.
For complete list of available search fields (keywords) please refer to Complete List of Available Search Fields section.
In this section:
In TeamCity you can search for builds using the Lucene query syntax. Though in TeamCity search query has two major differences, please refer to the Lucene documentation for complete syntax rules description.
To narrow your search and get more precise results you can use available search fields - indexed parameters of each build. Please refer to the Complete list of available search fields for more details.
When using search query in TeamCity, please pay attention to the following major differences in query syntax from Lucene native syntax:
AND
operator in query. That is, if you type in the following query: "failed @agent123", then you will get a list of all builds that have keyword "failed" in any of its search fields, and were run on build agent, which name is "agent123".{tip}Prefix search is not used for query with search keywords. In this case you can use wildcards ("\*" and "?"). For example, a query "tests:FxCopFile*" will results in list of all builds that include tests which names start with "FxCopFile".{tip} |
You also have a possibility to perform fuzzy search using the tilde, "~", symbol at the end of a single word term which to search items similar in spelling.
You can combine multiple terms with Boolean operators to create more complex search queries. In TeamCity, you can use AND, "+", OR, NOT and "-".
When using Boolean operators, type them ALL CAPS. |
This operator is used by default. |
TeamCity also supports usage of "*" and "?" wildcards in the build query.
Please do not type an asterisk sign, *, at the beginning of the search term because it can take a significant amount of time for TeamCity to search its database. For example, |
When using search keywords, use the following query syntax:
<search field name>:<value to search> |
Search Field |
Shortcut |
Description |
Example |
---|---|---|---|
agent |
|
Find all builds that were run on specific agent. |
|
build |
|
Find all builds that include changes with specific string. |
|
changes |
|
Find all builds that include changes with specific string. |
|
comitters |
|
Find all build that include changes committed by specific developer. |
|
configuration |
c |
Find all builds from the specific build configuration. |
|
file_revision |
|
Find all builds that contain a file with specific revision. |
|
files |
|
Find all build that include files with specific filename. |
|
labels |
l |
Find all builds that include changes with specific VCS label. |
|
pin_comment |
|
Find all builds that were pinned and have specific word (string) in the pin comment. |
|
project |
p |
Find builds from specific project. |
|
revision |
|
Find all builds that include changes with specific revision (e.g., you can search for builds with specific changelist from Perforce, or revision number in Subversion, etc.). |
|
stamp |
|
Find all builds that started at the specific time (search by timestamp). |
|
status |
|
Find all builds with specific status. |
|
tags |
t |
Find all builds with specific tag. |
|
tests |
|
Find all builds that include specific tests. |
|
triggerer |
|
Find all builds that were triggered by specific user. |
|
vcs |
|
Find builds that have specific VCS. |
|
In addition to above mentioned search fields, you can use two following shortcuts in your query:
Please pay attention that when you use these shortcuts, you should not insert colon after it. That is, the query syntax is as follows: |
Shortcut |
Description |
Example |
---|---|---|
# |
Search for build number. |
|
@ |
Find all builds that were run on the specific agent. |
|
You can use double-colon sign (::
) to search for project and/or build configuration by name:
pro::best
— search for builds of configurations with the names starting with "best", and in the projects with the names starting with "pro".mega::
— search for builds in all projects with names starting with "mega"::super
— search for builds of build configurations with names starting with "super"TeamCity also provides "magic" keywords (for the list see table below). These magic keywords are formed of the '$'
sign and a word itself. The word can be shortened up to the one (first) syllable, that is, the $labeled
, $l
, and $lab
keywords will be equal in query. For example, to search for pinned builds of the "Nightly build" configuration in the "Mega" project you can type any of the following queries:
configuration:nightly project:Mega $pinned
c:nigh p:mega $pin
M::night $pin
Magic word |
Description |
---|---|
$tagged |
Search for builds with tags. For example, |
$pinned |
Search for pinned builds. |
$labeled |
Search for builds that have been labeled in VCS. For example, to find labeled builds of the Main project you can use following queries: |
$commented |
Search for builds that have been commented. |
$personal |
Search for personal builds. For example, using |
h2. Performing Search *To find the desired issues:* # Navigate to the search field located in the upper-right corner of TeamCity web UI. \\ !searchField.png!\\ \\ # Type the search criteria and press the *Enter* or *Return* key. By default, TeamCity will search all builds-related data such as project and build configuration name, changes committer name, vcs root, trigger, changes description and so on. The results appear in a new pop-up window:\\ !searchResultsWindow.png|thumbnail!\\ {note}By default, TeamCity searches for all items you type in the search field. {note} # Click the *view results on a separate page* link to explore the search details. On the page that opens you can view the results summary: !searchResults.png|thumbnail! {note}You will see only search results from projects you have [permission | Role and Permission] to view. {note} In the example above the keywords were found in developer's changes, project, build status and build trigger. {tip}By default, search results on the dedicated search results page (not in pop-up) are sorted by relevance. You can also sort results by time. To do so, select proper item in a drop-down list to the right of the search query field. {tip} |