Getting the name of the calling trigger inside a run script

Hi - I have multiple scheduled triggers which cause a deployment.

Inside that deployment I have a powershell script which runs and I want to be able to decide to do different things depending on the scheduled trigger made the deployment.

Is there an Octopus variable that I can use to access the name of the trigger please?

Hi Mark,
Thanks for reaching out, Unfortunately there is no variable that stores the name of the trigger that created a deployment, currently the only way to determine which trigger created a deployment is by looking through the Process recurring scheduled deployments task logs.

Without knowing much about your Octopus setup, it might be possible to achieve what you are asking for using Channels, you could configure for example 2 channels and have a different variables scoped to each channel, or even run different steps depending on the channel. You can even access the channel during deployment using the Octopus.Release.Channel.Id or Octopus.Release.Channel.Name variables.
When setting up the scheduled trigger there is an option to select which channel you would like to use in the Trigger Action section.

I hope that helps, please let me know if you have any further questions.

Kind regards,
Tom W

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.