I need to have a script that validate whether deployment should occur on a server. The problem with using “Deploy a Package” Octopus template is that it does not allow me to run a script before it distribute/extract the package. I cannot use the “Run Condition” to validate a variable as the variable I want to validate is at machine level and I have the understanding that this is not possible with Octopus (see Variable scope in Step Run Condion).
The only way I can think to get around this is to run the “Deploy a Package” within a script. Do you have an API that will allow me to do this or a better idea on how to accomplish this?