.bat Script Interaction with TeamCity
We are using a bat file to build a Visual Studio project. If a problem occurs we would like to promote information about that to TeamCity as failure.
As suggested in product documentation we tried something like this:
IF NOT EXIST %1\File.exe GOTO error
:error
##teamcity[buildStatus status='FAILURE']
The problem is this command is not interpreted correctly and build fails with:
'##teamcity[buildStatus' is not recognized as an internal or external command,
operable program or batch file.
Process exited with code 1
This produces failure too but not the one we would like. What are we doing wrong?
operable program or batch file.
Process exited with code 1
This produces failure too but not the one we would like. What are we doing wrong?
Please sign in to leave a comment.
It looks to me as though you want to echo the service message, not execute it.
@echo ##teamcity[buildStatus status='FAILURE']