JetBrains / teamcity-deployer-plugin

Deployer plugin for TeamCity CI server
http://confluence.jetbrains.net/display/TW/Deployer+plugin
Apache License 2.0
39 stars 29 forks source link

Join on stderr stream in SSH Exec #106

Closed bjacklyn closed 5 years ago

bjacklyn commented 5 years ago

We are seeing issues with SSH exec where additional output is written to the build log after the SSH exec step says it is done.

SSH exit-code 1 Disconnecting from (AGENT) port 22 Caught an exception, leaving main loop due to Socket closed Step Execute on (AGENT) (SSH Exec) failed ... (((More output is still written to the build log here)))

If SSH exec is the last build step, and a service message to publish artifacts is part of the later output then TC will end the build but still be publishing the artifacts. The next build to run on the agent will immediately fail with "Failed to start build. Build with id null is running on agent"

I'm not sure if this change will fix my issue, but it looks like a bug and it could cause this behavior.

nskvortsov commented 5 years ago

It definitely looks like a misprint! Thank you for the patch!