Variable 'Octopus.Deployment.SpecificMachines' returns nothing

Hi,

I’m trying to add a list of deployment targets into email notification step, but variable ‘Octopus.Deployment.SpecificMachines’ returns nothing. Why is it so?

I’m using 3.3.1 both on server and tentacle.

Hi Andrey,

Thanks for reaching out. The variable Octopus.Deployment.SpecificMachines will only be populated with machines if prior to start your deployment, you select a specific list of targets as shown on the attached screenshot, instead of just deploying to everything on the target environment.

If you want to list the machines on the deployment on an email, there’s not a variable for that, but there is a rather cumbersome way to do it. My pal Michael did a very good job explaining it on the link below

Best regards,
Dalmiro

Hi Dalmiro,

Thanks for the link. Did I get it right that I have to use output variables, because variable #{Octopus.Deployment.Machines} mentioned in MIchael’s post is not available in 3.3.1?

Hi Andrey,

The variable ‘#{Octopus.Deployment.Machines}’ should be available, but since its a single string with machine names separated by a comma, you can’t iterate on it to get each machine. Also, it has the machine IDs (‘machines-1’) and not their names. For this reason you’ll need to use an output variable.

Thanks,
Dalmiro

I just didn’t find it in the list of system variables: http://docs.octopusdeploy.com/display/OD/System+variables

Concatenated list is fine for me, but IDs are inacceptable… Thank you for your answer.