开发者

TeamCity + Psake + SqlCmd Powershell infinite loop

I'm trying 开发者_开发知识库to use the Powershell Runner in TeamCity 6.5.2 to run a Psake task that depends on a task that calls out to SqlCmd. If I try to do this, teamcity seems to get into an infinite loop until it eventually times out or errors out.

I'm usinged the -Command option in TeamCity otherwise errors to don't bubble to TeamCity.

It seems like it has something to do with SqlCmd. I found this blog and tried tweaking the sqlcmd encoding to Unicode but no luck.

Has anyone else seen this behavior and if so how to fix?


I had the same problem today.

The bug is TW-17732 in their YouTrack it's a bug in the -Command mode of the runner and they are deprecating it instead of solving it.

The recommended mode is the -File mode but it might require you to change the security policy on each agent by typing in an Administrator powershell console:

Set-ExecutionPolicy RemoteSigned


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜