Hi Octopus Deploy team!
Getting along great with your architecture. Multiple parallel deployments of a mix of single-tenant and multi-tenant instances of our WCF API with IIS, certificate and load balancer management all out of a single PostDeploy script sitting in our NuGet package. One of our biggest problems is that we keep learning more about what we can do but simply don’t have the time to do it all!
However, I’m a bit concerned about deployment cancellation. Part of our deployment process requires we perform operations with IIS and we discovered through some trials that they are not reliable in parallel. As such, we have a simple file I/O-based locking system that ensures only one deployment can do these operations at a time. It works fine.
The problem is that any of those deployments may be cancelled while they hold this lock and, as far as I know, once that cancel button is clicked, I’ve lost control and any opportunity (in that particular deployment) to clear out this lock.
I stuffed a DeployFailed.ps1 in the NuGet package in the hopes it would get invoked on cancellation, but no luck. I put another step in my process to run on failure of the previous step, but this doesn’t get invoked either. Fair enough, makes sense considering we’re not really dealing with a failure.
I really want to avoid some kind of orphaned-lock-management-process that always runs and keeps tabs. Hardly an elegant solution and really just another thing to monitor.
Any suggestions?
Cheers,
Jay
P.S. I’m on Octopus Deploy 2.6.4.951 until we’ve waded through the red tape (internal) to upgrade (but we could expedite this if a newer version offers a decent option)