Bash Script Usage of Set-OctopusVariable

Hi,
I’m looking to build a step template to install Docker Swarm.

One of the things I would like to do is to interrogate the Manager server and store information in a Step Variable that can then be used by worker servers to register it to the swarm.

Do you have support to use Set-OctopusVariable in bash or any other idea on how I can pass information between server within octopus?

Regards
B.

Hi,

Thanks for getting in touch. Octopus does support setting output variables in Bash! The syntax you’d use is set_octopusvariable "TestResult" "Passed". This is from the example shown in our output variables documentation page.

Side note: if you’re willing, we’d love to have you consider contributing this step template to the community for others to benefit from as well. :slight_smile:

Don’t hesitate to reach out if you have any further questions going forward.

Best regards,

Kenny