Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In TeamCity you can search for builds using the Lucene query syntax; however, a TeamCity search query has two major differences described below.

To narrow your search and get more precise results, use the available search fields - indexed parameters of each build. For complete list of available search fields (keywords), refer to this section of the page.

Differences from Lucene Syntax

...

Search Field

Shortcut

Description

Example

agent

 

Find all builds that were run on the specified agent.

agent:unit-77, or agent:agent14*

build

 

Find all builds that include changes with the specified string.

build:254 or build:failed

buildLog

 

Find all builds that include certain text in build logs. It is disabled by default.

buildLog: "NUnit report"

changes

 

Find all builds that include changes with the specified string.

changes:(fix test)

committers

 

Find all build that include changes committed by the specified developer.

committers:ivan_ivanov

configuration

c

Find all builds from the specified build configuration.

configuration:IPR
c:(Nightly Build)

file_revision

 

(not supported by default since TeamCity 2017.1) Find all builds that contain a file with the specified revision.

file_revision:5

files

 

(not supported by default since TeamCity 2017.1) Find all builds that include files with the specified file name.

files:

labels

l

Find all builds that include changes with the specified VCS label.

label:EAP
l:release

pin_comment

 

Find all builds that were pinned and have the specified word (string) in the pin comment.

pin_comment:publish

project

p

Find all builds from the specified project.

project:Diana
p:Calcutta

revision

 

Find all builds that include changes with the specified revision (e.g., you can search for builds with a specific changelist from Perforce, or revision number in Subversion, etc.).

revision:4536

stamp

 

Find all builds that started at the specified time (search by timestamp).

stamp:200811271753

status

 

Find all builds with the specified text in the build status text.

status:"Compilation failed"

tags

t

Find all builds with the specified tag.

tags:buildserver
t:release

tests

 

Find all builds that include specified tests.

tests:

triggerer

 

Find all builds that were triggered by the specified user.

triggerer:ivan.ivanov

vcs

 

Find builds that have the specified VCS.

vcs:perforce

build problem
 

Since TeamCity 10.x, Find builds with the specified build problem

 buildProblem:Compilation failed

...

To enable search by the build logs, perform the following:

  1. Set the tc.search.indexBuildLog=true TeamCity internal property
  2. Since the logic will increase server memory usage, you need to increase increase memory size in -Xmx JVM option on at least 5 Gb (more if you have large build logs/many builds). You will need to switch to 64 bit JVM for that.
  3. Set the tc.search.indexBuildLog=true TeamCity internal property
  4. Reset the search index

After re-indexing, TeamCity will be able to perform searching by specified text in the build logs and will list the relevant builds.

...