First up, I would like to congratulate you on the great product you are building. As a DevOps engineer I’ve looked at several options to automate our build deployments and yours is the one we are most comfortable with.
A question - in the emails we generate post deployment, my manager would like to see if we can also get the machines to which the build package was deployed to. I checked the variable Octopus.Deployment.SpecificMachines, but this one refers to the OD ID of the machines, which doesn’t match the hostname of the machine. We’re looking for something that would quickly help us identify the machines.
I’ve also tried to assign the hostname as a variable in one of the previous PowerShell steps and then use it in the email template, but sadly that doesn’t work either.
Am I missing something or ideas on how to get this implemented are much appreciated.
thanks for the update.
With regards to your comment on the above thread:
In the meantime, you could use the following snippet which uses the function Get-OctopusMachine from the module Octoposh to resolve the names of the machines based on variable Octopus.Deployment.SpecificMachines
$IDs = $OctopusParameters[‘Octopus.Deployment.SpecificMachines’].split(",")
$names = Get-OctopusMachine -resourceOnly | ?{$_.id -in $Ids} | select -expandproperty name
$names
You can then use the content of the variable $names to build the string that you’ll pass down to Octo.exe
would this require octoposh be installed on the tentacle machine or on the octopus server?