Hi, I’m trying to modify an email code sample that you provided on your website (http://docs.octopusdeploy.com/display/OD/Email+notifications) and make it a little bit more readable or eloquent, however I can’t find any way to get the result I am looking for because I can’t get it to resolve the “step” variable in the each loop.
#{each step in Octopus.Step}
#{Octopus.Action[StaticData].isSkipped}
#{Octopus.Action[step].isSkipped}
#{Octopus.Action[step.Name].isSkipped}
#{Octopus.Action[{step}].isSkipped}
#{Octopus.Action[{step.Name}].isSkipped}
#{Octopus.Action[#{step}].isSkipped}
#{Octopus.Action[#{step.Name}].isSkipped}
#{/each}
Is there any way to resolve a variable inside another variable in emails like what I’m trying to do above?
Also, what’s the difference between Action and Step? Is it simply a granularity thing? (Action may contain multiple steps?)
And why isn’t there a step.isSkipped?
Thanks,
Complete code for reference:
Task summary
-
#{each step in Octopus.Step}
#{if step.Status.Code}
#{if step.Status.Error}
- #{step | HtmlEscape} — #{step.Status.Code}
#{step.Status.Error | HtmlEscape}
#{step.Status.ErrorDetail | HtmlEscape}
#{/if} #{unless step.Status.Error} #{if Octopus.Action[step].isSkipped} - #{step | HtmlEscape} — #{step.Status.Code} #{/if} #{unless Octopus.Action[step].isSkipped}
- #{step | HtmlEscape} — #{step.Status.Code} #{/unless} #{/unless} #{/if} #{/each}