Pawel Pabich Pawel Pabich July 13, 2016

Script Parameters

We have extended standalone scripts so now you can pass command line parameters to them.

Before this feature you had to write "Octopus" scripts which used the Octopus API to get variable values, like $OctopusParameters["MyValue"] in PowerShell. This makes it hard to test your scripts outside of Octopus.

Otherwise you could write an additional "wrapper" script which used the Octopus API to get variable values and pass those as parameters to your "normal" scripts. Now it was easier to test your "normal" scripts outside of Octopus, but you needed to manage additional files.

In Octopus 3.3.21 none of this is necessary and you can parameterize your scripts without needing any those workarounds.

Script parameters

Parameters need to be provided in a language specific way. E.g. -Parameter1 Value1 -Parameter2 Value2 for PowerShell or Value1 Value2 for Bash. This is important because we take them as they are and pass them to the appropriate execution environment. Pseudo code: scriptrunner script parameters.

Scripting

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.