I am developing a custom TeamCity plugin that integrates with an enterprise deployment platform. It should deploy the binaries at the end of the build to some deployment platform by executing a command line command. Currently there is a class that extends the BuildFeature class on the server side to setup the details of artifacts to be deployed. On the agent side there is a class that extends AgentLifeCycleAdapter class, which overrides the beforeBuildFinish() method and executes a long running command line process. I am using SimpleCommandLineProcessRunner class to execute the external command line process:
final ExecResult result = SimpleCommandLineProcessRunner.runCommand(commandLine,
The process is being stopped after two minutes, which looks like some timeout:
[18:13:50]Running as atom_builder
[18:13:50]Executing C:\TeamCity\buildAgent\work\db4107aa7e390a67\adeploy\adeploy.exe artifactVersion push C:\TeamCity\buildAgent\work\db4107aa7e390a67\agent\atom-agent-artifact-version.xml
[18:13:50]Running at C:\TeamCity\buildAgent\work\db4107aa7e390a67\agent
[18:15:22]2018-11-07 18:13:51 [Information] ["ArtifactPushService:PushArtifactAsync"] Calling method with parameters '"adeploy.exe"
[18:15:22]Exit code: -1
What is the proper way to execute long running processes as part of the build when the build configuration has a custom Build Feature?