Setting default for whether to run step or not

Hi,

When i deploy a release to an environment, under the advanced settings I have the option to control which steps are executed. Is there anyway I can control the default state of the steps that should be run?? I have a deployment process where I would like the user of octopus to decide whether to run a step each time they deploy.

Thanks, Jon.

Hi Jon,

Thanks for getting in touch! There is no way to change the default state of steps. We have interpreted your scenario to be that you want all steps default to skip so the user must decide what steps need to be run, is this correct?
If so, we have the following UserVoice suggestion.

Please visit the suggestion and add your votes/comments. If this is not the case could you please provide more information about the scenario.

Thanks for the suggestion.
Daniel

Hi Daniel,

The UserVoice suggestion is exactly the scenario I am describing. I will add my vote to the suggestion.

Thanks, Jon.

I missed this as well in the beginning, but then I simply resorted to creating a prompt variable with a default value of ‘False’, which can be changed in the UI to ‘True’ whenever the user wishes to run the step.

I then created an argument in the step templates called Enabled and bind the value of the prompt variable to this argument. If you don’t wish to use that functionality in other install processes you simply enter ‘False’ in the argument field instead of binding it to a prompt variable. Powershell code for the step template itself (just insert first in the step template you are using):

if ([System.Convert]::ToBoolean($OctopusParameters[‘Enabled’]) -eq $false)
{
exit 0
}