Trigger build on remote server
Hi,
I currently have following set up with Cruise control.
Server 1 - Build the ASP .net solution - Copies files to remote server
Server 2 - Installs MSI files - Initialize database and finalize build - Install pools.
When Server 1 finishes building it triggers remote server process using TCP request as following.
tcp://SERVER2:21234/CruiseManager.rem
I want to achieve this same setup using TeamCity.
Teamcity version 2018.1.1
Windows Server 2008.
Source control TFS Server 2015
I want to know how to Trigger Build on Server 2 when Server 1 is finished building. Trigger in TeamCity currently allows only to create Trigger on same server and not remote server.
Thanks in advance.
Best regards,
Manmath
Please sign in to leave a comment.
Hi Manmath,
There are at least two straightforward possibilities to run this:
-If you have a TeamCity Server in both server A and B: Simply add an additional last build step on A that triggers a build on B using the REST API: https://confluence.jetbrains.com/display/TCD18/REST+API#RESTAPI-TriggeringaBuild
-If you have a single TeamCity server, but have build agents running in both A and B: Set up the build configuration that runs on A so that it is forced to run on A. Set up a build configuration that runs on B with all the steps of your second server. Make B have a snapshot dependency on A. https://confluence.jetbrains.com/display/TCD18/Assigning+Build+Configurations+to+Specific+Build+Agents
The second way would be recommended, reducing the amount of "servers" you have to run, plus you won't need to manually copy the artifacts. Simply make them be artifacts of build A, then set up additionally to the snapshot dependency, an artifact dependency on all artifacts of the same chain.
Hope this helps.