calling winrs multiple times from TeamCity

1.3k views Asked by At

if I run 2 winrs commands in the same Team City Command Line like this:

Failing Build

The build will hang.

Hanging Build

  • if I manually kill the winrs process on the build agent, the build will finish but will exit with code 1.
  • if I run just one winrs command the build will pass.
  • If I split the winrs command into 2 different build steps the build will also pass.
  • If i put the two lines in a batch file and run that on the build agent it works also.
  • If i Put the two lines in a cmd file and run that on the build agent as the build agent user it works also.

Does anyone have any idea what's going on here/how to fix this?

I'm hoping either a Team City or winrs guru can help me.

2

There are 2 answers

0
Jon Canning On

Prefix your commands with START /WAIT

1
isel On

yes, START /WAIT works, even with winrs requests to multiple servers in the same build step it won't return the output though