Hi everyone,
I am evaluating Octopus deploy for improving our DevOps and continuous delivery practices. We have.Net framework applications that run on Windows hosts, and .Net core applications that run on Linux.
I have created a single project to tinker with, with a Windows tentacle (Windows 10) and an SSH tentacle to Ubuntu desktop. The SSH tentacle uses the option “Mono not installed”.
Now I created a simple JSON snippet variable (called “Configuration.Json”) and attempted to use that snippet in both Powershell and Bash scripts. In Bash, I tried to reference the variable from a script defined in Octopus, and from an external Bash script in the package. All three should, in theory, have the same output, but it’s all different.
Step 3 in the screenshot: The Powershell output is correct, the entire string as defined in the variable is printed. The script is simply:
Write-Host $OctopusParameters['Configuration.Json']
Step 4 in the screenshot: The Bash script from source has the entire string, but the quotes are gone making the JSON invalid. The script looks like:
echo "#{Configuration.Json}"
Step 5 in the screenshot: The external Bash script has both the quotes and part of the string missing. The script looks like this:
echo "$1"
The following argument is passed to the script: “#{Configuration.Json}”
Can someone help me achieve more consistent behavior? Thanks in advance for the help!
Kind regards,
Oskar uit de Bos