I am using Jenkins build server to create release. As a part of my deployment script I am using a script that I have in my Script Modules; it takes a Git SHA as a variable. It is implemented like this
# check if needed parameters are passed
If ([string]::IsNullOrEmpty($OctopusParameters["GitHubHash"])) {
Write-Host "No github hash was specified, there's nothing to report then."
exit
}
# ...
$gitHubHash=$OctopusParameters["GitHubHash"]
In order to set this variable, when I run octo.exe, I do it like this:
octo.exe create-release --project MY-PROJECT --version 1.0.i --variable GitHubHash:abcde12345 --server ... --apiKey ...
but in my deployment report, I can see that the value is not passed to the script modules.
OTOH when the variable is set in the project (statically), the script works ok.
What am I doing wrong?
thanks for response!