This plugin lets you search for some text using regular expressions in a set of files or the console log. Once a match is found, you can downgrade a successful build to a status of unstable, failure, or not built.

For example, you can search for the string failure in a set of log files. If a match is found, you can downgrade the build from success to failure. This is handy when you have some tools in your build chain that don't properly set the exit code.

Note that the search is always performed, even on builds which returned a non-zero exit status, but the reclassification only applies to builds which returned an overall exit status of zero.


The basic pipeline syntax is as follows:

    findText regexp: '<regular expression>', fileSet: '<file set>'

The regular expression uses the syntax supported by the Java Pattern class. The file set specifies the path to the files in which to search, relative to the workspace root. This can use wildcards, like logs/**/*/*.txt. See the Ant FileSet documentation for details.

To also check the console log, use the following syntax:

    findText regexp: '<regular expression>', fileSet: '<file set>', alsoCheckConsoleOutput: true

Note that if you just want to check the console log, you can omit the file set:

    findText regexp: '<regular expression>', alsoCheckConsoleOutput: true

To customize the build result, you can use any combination of succeedIfFound, unstableIfFound, or notBuiltIfFound. For example, to mark the build as unstable if the expression is found:

    findText regexp: '<regular expression>, alsoCheckConsoleOutput: true, unstableIfFound: true


Versions 1.12 and newer

See the GitHub release page.

Version 1.11 (June 1, 2019)
Version 1.10 (Jan 31, 2014)
Version 1.9 (Feb 13, 2011)
Version 1.8 (Feb 6, 2010)
Version 1.7 (May 4, 2009)
Version 1.6 (Nov 6, 2008)
Version 1.5