I have a project that can be deployed tenanted or untenanted… basically the normal CI > QA > PRD is untenanted while there are also tenanted QA environments for developers to do long term work.
I have a step that I would like to run during an untenanted deploy, but skipped if it is deploying to a tenanted (developer) environment. Is this possible?
The step is a PoSh script, so if there is a simple Octopus tenant var I could do something like if ($Tenanted -ne $True) {Run script}
I did try: $Tenant = "#{Octopus.Deployment.Tenant.Name}" if ($Tenant -eq $Null){Run Script}
Apparently in an untenanted environment $Tenant = “#{Octopus.Deployment.Tenant.Name}” sets $tenant to the actual text “#{Octopus.Deployment.Tenant.Name}” instead of leaving it null
Now, because the Tenant.Name variable will be empty until something gets assigned to it, you should be able to use a Variable Expression for your run condition. This should work: