ping url for successful 200 response before continuing build

Hi,

I have a service that's running on 2 VM's, with a load balancer above them. I want to deploy the service without any downtime, so what I'm looking to do is to , build, shutdown deploy start 1 instance of the service. Wait for it to be online, and then do the same with the second instance of the service. 

Is it possible to curl an endpoint with the cmd build method, but keep polling it until it's 200, and then start up the second instance?

0
1 comment
Hi,

As I understand it, you need a script that will continuously request the endpoint and exit only when response 200 is received. This is not specific to TeamCity scenario, but rather to scripting. It may be complicated to implement such script in command line build step, but it should be rather easy to do with, for example, Python.

Best regards,
Anton
1

Please sign in to leave a comment.