I have a project that is built into an executable. Some kind of server. And a Team City as CI. I configured Team City to automatically build my sources.
I would like to achive the following steps:
- Sources are built by Team City when someone commits into repo. (done)
- Built binaries are copied to some location. (On the same machine where Team City server is running)
- My executable is launched with some parameters.
First two steps I managed to configure with creating separate Build configuration for deployment with Artifacts dependency. But I don`t know how to start my executable. If I do it with Command Line Build step than Build Agent hangs until the application is killed. And I need the opposite - launched by Build Agent application should live for a long time while the Build Agent itself finishes right after running my exe.
Is it possible to do this or am I misusing CI?
Also I need to be able to do Redeployment:
- Kill previously run application (by process image f.e.)
- Do all steps from regular deployment.
Searching "Continuous deployment" gives results only for Web-based deployment which is not my case.
In order to achieve what you want to, you could try using a PowerShell build step and use the following script.
This will return an object to you, but won't block the thread and won't cause your agents to wait for the process to end.
Further documentation can be found on MSDN - Start-Process Documentation
Hope this helps