Hi i am trying to get the name of the step which is a part of build and deployment.
There are several steps which are using same Template and i need to differentiate on the basis of step name and apply condition accordingly.
Using powershell.
Hi @ani.ashwani,
Thanks for getting in touch! I will need to get some further information from you here.
It sounds like you are trying to find the name of a step from a deployment in Octopus. Would you be able to provide some more specific information about your requirements here?
Without knowing more about your requirements here my help is limited. It does sound like you may be after our system variables though. Or possibly our API.
Looking forward to hearing from you.
Best regards,
Daniel
hi Daniel
i have 2 steps in which i am triggering SQL backup script. say first step name is “SQL Backup 1” and other step name is “SQL Backup2”. Both steps are using common PS template say “SQL Backup”. in this PS script i have written logic of taking backup of a DB.
so for some reason i want to check in the “SQL Backup” template that from which step this template is triggering, if its “SQL BAckup2” step then i wan to skip SQL Backup logic from the common template “SQL Backup”
Let me know if its possible. i have found another way to implement this logic. but i still wanted to know if i can achieve this with same logic.
Hi @ani.ashwani,
Thanks for getting back. I’m not sure that I am interpreting your issue correctly so let me know if this is not helpful.
We have a system variable #{Octopus.Step.Name}
. This variable will evaluate to the name of the step it is run in.
I’m not sure if this helps. If not, perhaps you could provide the logic you are currently using to do what you need here?
Best regards,
Daniel
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.