3

我正在尝试使用 TeamCity 6.5.2 中的 Powershell Runner 来运行 Psake 任务,该任务依赖于调用 SqlCmd 的任务。如果我尝试这样做,teamcity 似乎会进入一个无限循环,直到它最终超时或出错。

我在 TeamCity 中使用了 -Command 选项,否则错误不会冒泡到 TeamCity。

它似乎与SqlCmd有关。我找到了这个博客并尝试将 sqlcmd 编码调整为 Unicode,但没有运气。

有没有其他人看到过这种行为,如果有,如何解决?

4

2 回答 2

2

我今天遇到了同样的问题。

该错误是他们的 YouTrack 中的 TW-17732,它是跑步者模式中的一个错误,-Command他们正在弃用它而不是解决它。

推荐的模式是该-File模式,但它可能需要您通过在管理员 powershell 控制台中键入来更改每个代理的安全策略:

Set-ExecutionPolicy RemoteSigned
于 2014-08-29T07:32:10.343 回答
0

One place where I have seen PSake causing hang is regarding log output. Can you try redirecting the output of the sqlcmd to nul (>nul) and se e? Or use out-null or whatever is appropriate.

于 2011-07-22T07:01:34.053 回答