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
$stepName = $OctopusParameters[“Octopus.Step.Name”]
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:
$childStepName = $OctopusParameters[“Octopus.Action.Name”]
I hope this helps! Let me know how you go or if you have any further questions moving forward.
Hi Kenny, it works well, thanks a lot for help!
That’s great to hear that worked for you! Thanks for letting me know, and don’t hesitate to reach out if you have any questions in the future.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.