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.
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
.
Tags:
Related posts

Trying Raw Octopus
With SSH deployments, the SSH connection eliminates the need for a Tentacle so Octopus could issue commands directly to Calamari on the remote target.

Octostache Update - JSON, Indexing, Formatting and Dates
As a part of supporting Docker deployments we realised that we needed a way to access the JSON formatted information that is returned as the output of a container inspection.

Octopus loves F#
The upcoming release of Octopus 3.4 will include F# 4.0 support which means that both custom and standalone scripts (*.fsx) can be written in it.