Run Condition: Variable

We have started using the “Run condition: only run when the variable expression is true” as a way to control whether a step should run based on a combination of Tenants and Environments (since the list of valid Tenants is different in each Environment, I cannot simply add a Tenant Group filter on the step, but need the greater flexibility of an Octo Variable.)

However, this has the unfortunately side-effect of the step running ONLY based on the variable; it no longer cares whether earlier steps ran successfully or not (since selecting Run condition:Variable is unselecting the Success or Failure choices.)

This is a problem for us, in that these steps are now running even when there has been a failure in an earlier step, which we do not want.

What we need is either: make Run condition: Variable separate from Run condition: Success/Failure/Always; or create new entries SuccessAndVariable, FailureAndVariable.

Thanks for your help.

Hi Mike,

Thanks for getting in touch and for the suggestion!

We’ve raised this issue to have your suggestion implemented.

Again, many thanks for the suggestion.

Thank you and best regards,

As a workaround for anyone who needs it, until this gets added, the following will work:

To run only on success and variable truthiness:

#{unless Octopus.Deployment.Error}#{PromptedVariable}#{/unless}

To run only on failure and variable truthiness:

#{if Octopus.Deployment.Error}#{PromptedVariable}#{/unless}

Thanks Chris for posting that workaround!

Many thanks,


I found that work-around on the board shortly after posting. It works, but I’d still want the more direct way of doing on the step.