【发布时间】:2013-11-19 16:41:58
【问题描述】:
运行 Teamcity 命令行脚本时,curl 未被识别为内部或外部命令。 Curl 安装在本地,在命令提示符下可以正常工作。
构建日志结果:
[20:05:35]Step 2/2: Command Line
[20:05:35][Step 2/2] Starting: C:\BuildAgent\temp\agentTmp\custom_script7047202395618427524.cmd
[20:05:35][Step 2/2] in directory: C:\BuildAgent\work\376652cbd18bb804
[20:05:35][Step 2/2] 'curl' is not recognized as an internal or external command,
[20:05:35][Step 2/2] operable program or batch file.
[20:05:35][Step 2/2] Process exited with code 1
[20:05:35][Step 2/2] Step Command Line failed
卷曲命令
curl -v --request PUT %teamcity.serverUrl%/httpAuth/app/rest/builds/id:%teamcity.build.id%/pin
-u admin:admin
【问题讨论】:
-
下面给出的是用于获取构建信息的命令。 curl -v --basic --request GET %teamcity.serverUrl%/httpAuth/app/rest/changes? build=id:%teamcity.build.id% --data true --header "Content-Type: text/xml"