When i build a package I do not know what packages before it accomplished. I would like a backwards recovery model as shown in the image below.
So if package 5 fails it calls DeployFailed.ps1 on 5,4,3,2,1 in that order.


Also do steps have timeouts and how can i override? We want to stop our nservicebus distributors X minutes before a deployment … would be one of the first “steps” Start-Sleep -s XXX .

Hi Leblanc,

So if your deployment had:

  1. Deploy package ABC
  2. Deploy package DEF
  3. Deploy package HIJ

And package HIJ failed, you’d want the DeployFailed.ps1 to be called on HIJ, then DEF, and then ABC?

Tentacle currently doesn’t know that ABC, DEF and HIJ are part of the same “project” currently - Tentacle is in fact pretty oblivious. It gets a package, and it installs it. To be honest, I’d like to keep it this way, so if there is a simpler way this kind of recovery can be done that would be better.

Also, this will only happen on one machine - if deployment fails on machine 1, but succeeds on machine 2, the packages will only be rolled back on machine 1. Won’t that leave you in an invalid state anyway?

In answer to your second question, there’s no timeout on PowerShell commands - you should be able to sleep as long as you like. So yes, that would work.

Hope that helps,


DeployFailed.ps1 to be called on HIJ, then DEF, and then ABC?


Won’t that leave you in an invalid state anyway?

It will today, however, each package should be “All or Nothing” and should never leave me in an inconsistent state. #ACID

What i can do is create another project that is deployed to the same environments to reverse the order - can be done but a lot of additional work than a cascading DeployFailed.ps1. Currently the best way to handle failures is to NOT rollback. Update the nuget package with the fix and continue hitting try again - skipping steps that have already passed. Continue this until all steps are completed.

Hi Leblanc,

Thanks for the update. I’m moving this suggestion to the new Octopus Uservoice site so others can vote on it: