The documentation clearly explains how to reference files within a package with PowerShell, but since scripts in Octopus Deploy can be written in C#, Bash and F# as well, it would be neat if examples for these other languages were also provided.
I would like to know how I can reference files within a package with Bash. Can you please help me with some examples, or even better — update the documentation with some Bash examples?
/home/octopus/.octopus/OctopusServer/Work/20180312010836-264-87/script.sh: line 1: path: command not found
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage unzip [-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]
Extract FILEs from ZIP archive
...
The remote script failed with exit code 1
I’ve tried to do echo "Path: $path" and it looks like $path is empty. Am I using get_octopusvariable wrong or can you notice anything else that’s broken?
There’s a syntax issue with the second setup you tried. path = $(get_octopusvariable "Octopus.Action[Transfer].Output.FilePath") should actually be path=$(get_octopusvariable "Octopus.Action[Transfer].Output.FilePath") (notice the lack of spaces around the = sign).
If you are still unable to get this to work, could you send through some screenshots of your project deployment process and what OS your target server is running. (My target server I tested with is running Ubuntu 16.04)