Cancel a scheduled deployment

HI Team,

I am scheduling deployment with latest available version to production everytime programatically. we will not have sense of what is the version/package number. we don’t care anyway. But in some times, we might have to create another latest release to be scheduled on same time, cancelling older version deployment schedule. I didn’t find any documentation of canceling a deployment or override a deployment scheduled at certain time.

Hi,

Thanks for getting in touch! I assume you’re scheduling your deployments via the --deployat=VALUE argument in Octo.exe - is that correct?

When using this argument, it creates a queued task in Octopus which can be cancelled in the web portal. The queued task can be located under the Tasks tab which links to the deployment page.

I hope this helps! Let me know how you go or if you have any further questions or concerns moving forward.

Best regards,

Kenny

Yes, i am using deployat=VALUE argument in Octo.exe, also i know cancelling from web portal. But we want 100% automation where we want to schedule and also cancel programatically using Octo.exe commands. Do we know if this feature is there or Octopus Team has tracked as a future request?

Hi,

Thanks for following up and elaborating on your requirements. Unfortunately there’s no way via Octo.exe to cancel tasks. I’ve found a similar request, although old, to implement a cancel-deployment command into Octo.exe that you may want to throw some votes to. If it’s not exactly what you’re after, you can also suggest that as well. :slight_smile:

Currently, I believe the only other way outside of the web portal would be to cancel the task via the API, which can be done with POST /api/tasks/{id}/cancel HTTP/1.1, which is referencing the Tasks page in our API wiki.

We have one sample script working in the same general tasks area, though not exactly what you’re looking to do. Maybe this will provide a good starting point if you’re wanting to write an API script. :slight_smile:

I hope these resources help! Please don’t hesitate to reach out if you have any further questions or concerns.

Best regards,

Kenny

Thanks voted to Octo.exe Cancel-Deployment

Hi,

You’re very welcome, and thanks for letting me know. Don’t hesitate to reach out if you have any further questions in the future. :slight_smile:

Best regards,

Kenny

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