Expand Variable Conditionals to include OR/AND statements
Currently, Variable Conditionals as documented here:
https://octopus.com/docs/deployment-process/variables/variable-substitutions#VariableSubstitutionSyntax-Conditionalsconditionals
Does not allow for evaluation of more than one condition, which makes the syntax really ugly and dificult to read when workaround/hacks are implemented to evaluate more than one condition...
For example, currently only this is allowed:
{if Octopus.Deployment.Tenant.Name == "PreProd"}prod#{else}uat#{/if}
Make is easy to do OR/AND and evaluate more than one condition, like this for example:
{if Octopus.Deployment.Tenant.Name == "PreProd" || Octopus.Deployment.Tenant.Name == "Production"}prod#{else}uat#{/if}
To get an idea of the issues review this post (describes workaround for AND but OR is not possible so far!):
https://help.octopus.com/t/run-condition-variables-two-conditions/1585

-
Trisped commented
There is an older request with more votes at https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/18397306-add-support-for-and-or-operators-for-variable-re