Asynchronous deploys with waitForDeployment

We are starting a deploy in octopus from teamcity. Currently this teamcity builds waits for octopus to be finished which is not optimal. In order to speedup this process we would like to do the following:

  1. Start the deploy in octopus but do not wait for it to finish
  2. Do other stuff on the teamcity build agent
  3. Wait for the deploy to be finished

I know waitForDeployment exist which can solve step 1 but how to wait for a deployment to be finished? Should I just call deploy-release again but now with waitForDeployment set to true?

Hi @rick-van-dam,

Thank you for contacting Octopus Support.

Unfortunately, as far as we are aware, this is not currently possible as calling deploy-release again would attempt to make a new deployment. We don’t have anything else natively built into the Octo CLI that would accomplish this either.

You may be able to write a custom API script that can snag the pieces of information needed in order to confirm the deployment has been completed successfully. However, after a cursory glance, this would likely be quite complex to do.

If this is something you want to try to push forward with, a good place to start would probably be to check our swaggerui (via YOUR_OCTOPUS_URL/swaggerui). I’d probably start by looking at /{baseSpaceId}/projects/{projectId}/progression and go from there.

I wish I had a better answer for you. If you have any additional questions about this or anything else, please don’t hesitate to ask.

Best Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.