3

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?

Mark Boltuc
  • 3,487
  • 1
  • 27
  • 26

2 Answers2

2

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
Julien Roncaglia
  • 17,397
  • 4
  • 57
  • 75
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.

manojlds
  • 290,304
  • 63
  • 469
  • 417