We have some bash scripts executing on targets (Linux targets via SSH) that start with
set -euo pipefail for safe script execution. This seems to (since at least 2018.10.0 LTS) break the behaviour of
set_octopusvariable. Bash throws an error about an unbound variable
$3 somewhere inside the implementation of
This was not an issue in the previous version of Octopus Deploy we were using: 2018.4.4.
- Create a new project that can execute bash scripts somewhere.
- Add a step in process that executes a script.
- Define the script as follows:
set -euo pipefail echo "Setting MyVariable to Foobar" set_octopusvariable "MyVariable" "Foobar" echo "Set MyVariable to Foobar"
- Create a new release
- Deploy to some environment
- The deploy will fail with the error about “Unbound variable $3” in the script step.