Force build to fail

I am using build runner command line. I have to force a build to fail at a line in my .bat file. Is there a command ou executable from TeamCity I can call to force a build to fail??

2 comments

Hello,

In EAP build we've added an ability to change build status via special
message printed to the process output. To fail build it should be enough to
print something like this:
##teamcity[buildStatus status='FAILURE']
Note that line feed characters are required after the message.

You can read more about this service message here:
http://www.jetbrains.net/jira/browse/TW-3189

We did not announce such possibility since it is not yet tested enough and
there can be bugs. Also message format might be changed in the final
release.

--
Pavel Sher
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"



"Elida" <elida.fibonacci@gmail.com> wrote in message
news:27385854.1202906290620.JavaMail.itn@is.intellij.net...
>I am using build runner command line. I have to force a build to fail at a
>line in my .bat file. Is there a command ou executable from TeamCity I can
>call to force a build to fail??


0

Hello,

To fail build you can also return exit code 1 from the script.

--
Pavel Sher
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"



"Elida" <elida.fibonacci@gmail.com> wrote in message
news:27385854.1202906290620.JavaMail.itn@is.intellij.net...
>I am using build runner command line. I have to force a build to fail at a
>line in my .bat file. Is there a command ou executable from TeamCity I can
>call to force a build to fail??


0

Please sign in to leave a comment.