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.