从 TeamCity 运行 .bat 文件
如何从 TeamCity 自动执行批处理文件。我可以创建 TC 构建配置并让 TC 代理构建该配置并自动运行指定的批处理文件吗?
编辑:批处理脚本。
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
错误信息:
[12:25:12]: 'projBuild' 未被识别为内部或外部命令,[12:25:12]: 可运行的程序或批处理文件。[12:25:13]: 构建完成
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以使用命令行运行程序来完成此操作。
Yes, you can do it using Command Line runner.