I got a “Deploy to IIS” step defined and run a powershell script in Deployment Script within Custom Deployment Scripts. I need to get a path to the installed application. The following script works well when defined in the parent step
However $OctopusParameters[“Octopus.Step.Name”] returns the parent step name even when executed in the child step. Is it possible to get the value of the child step name using system variables?
Thanks for getting in touch! Child steps are available as Octopus.Action parameters. Only top level steps (parent steps or steps that don’t have any child steps) are available as Octopus.Step. You should be able to get the expected result within a child step by tweaking your script to match this: