Hi, I do some research to add the target machine name in the success/fail email notification, and success by below way. I think it’s simplest way I can found so far.
add a step template call "SetMachineName"
with powerShell like:
$MachineName =$OctopusParameters[“Octopus.Machine.Name”]
Set-OctopusVariable -name “MachineName” -value $MachineName
in email notification Template add
#{each machine in Octopus.Action[SetMachineName].Output}
I have an Octopus job which has 5 deployment process steps. Each step has a different role, in other words,
step1 runs on 1, 2, 3 servers
step2 and step 3 runs on 4, 5 servers
step 4,5 runs on 6, 7 servers.
Sometimes we simply disable few steps while performing the deployment. in other words, I will/may execute only steps 1, 2, 3 and not 4,5. For this kind of scenarios’, how can i get the list of the machine names for various executed steps and use them in my email step.
I want to clearly mention in my email saying that step#1 is ran on 1,2,3 servers and step#2 ran on 3, 4 and 5 servers etc.
Please suggest me the possible solution how can i achive this. Thanks in advance.