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?
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.
This file has been truncated.
Contributing step templates
Have a great custom step that other Octopus users will love? Here's how to get it out there!
1. [Fork](https://github.com/OctopusDeploy/Library/fork) the Library repository
2. Clone your fork into a directory on your own machine
3. _Export_ your template from the Octopus server
4. Save the exported JSON to a file under `/step-templates`
5. Check that the `LastModifiedBy` username is one you're happy to use on the site (ideally your plain GitHub username)
6. Add Id property and set it to a GUID using the following format `abcdef00-ab00-cd00-ef00-000000abcdef`, you can use [this site](https://www.guidgen.com/) to generate one automatically
7. Optional: Assign your template to an existing category. Have a look at existing templates to find the category that matches your template. If you don't specify it your template will be assigned to 'other' category.
- If you add a new category, make sure that you add an icon in `.png` format with a size of 200x200px to the `logos` folder with the same name as your category. Also, the `switch` in the `humanize` function in [`gulpfile.babel.js`](https://github.com/OctopusDeploy/Library/blob/master/gulpfile.babel.js#L92) must have a `case` statement corresponding to it.
8. If you're updating an existing step template, make sure the `Version` property is incremented (e.g. by 1). If the `Version` doesn't change then the [Community Library Integration](http://docs.octopusdeploy.com/display/OD/Step+Templates#StepTemplates-TheCommunityLibrary) in Octopus won't see your changes.
9. Commit and push your changes to your fork
10. View your fork in GitHub to create a _pull request_
Someone from the Octopus team will review your request and help to make the step consistent with the others in the library. Once it's ready we'll merge it into the main repository and publish it to [the library site](http://library.octopusdeploy.com).
**Note**: If you're editing an existing template we've got a tool you can use to help with packing and unpacking the scripts stored in the step template `*.json` file.
Don’t hesitate to reach out if you have any further questions going forward.