How can I automate executing a batch file from TeamCity. Can I create a TC build configuration and have the TC agent build that and automatically run the specified batch file?
EDIT: batch script.
echo off
echo Do you want to deploy xxxx to DerServ(yn):
set /p input=
if "%input%" == "y" goto :1
if NOT "%input%" == "y" goto :2
:1
SET MSBUILD="C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
%MSBUILD% xxxxx.defaultTeamCity.msbuild /target:projBuild
goto end
:2
ECHO Exiting...
goto end
:end
pause
Error message:
[12:25:12]: 'projBuild' is not recognized as an internal or external command,[12:25:12]: operable program or batch file.[12:25:13]: Build finished
Yes, you can do it using Command Line runner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With