Conditionally skipping a website deployment ('Octopus.Action.SkipRemainingConventions')

I have a relatively basic deploy website step that is using an output variable from a previous step. I have “custom scripts” checked and have an IF block in the pre-deployment script that checks the value of the output variable and then should either deploy the website or skip the step and not deploy. I have seen another forum post about a system variable, Set-OctopusVariable(‘Octopus.Action.SkipRemainingConventions’, ‘True’), that sounds like it could be used to perform this ‘skip deployment’ type of action, but it does not appear to work. I even removed my IF logic and just pasted that in the pre-deployment script and it still deploys every time. Is this not the correct way to try to skip and exit a deployment based on a condition? Skipping steps that are just running powershell are easy enough with ‘exit 0’, but skipping a deploy step is puzzling me.

I have attached some screenshots of the process setup, if that helps.

Hi Jeff,

Thanks for getting in touch. Unfortunately there is an error in our docs on using SkipRemainingConventions with PowerShell. The correct syntax to use is:

Set-OctopusVariable 'Octopus.Action.SkipRemainingConventions' 'True'


Set-OctopusVariable -name 'Octopus.Action.SkipRemainingConventions' -value 'True'

I hope that helps. I’ll go and fix up our docs now.


Tried that first corrected syntax you provided and it worked wonderfully. Thank you!