I tried to create a script task to save values to a file, and recover them trhough the variable injection plugin within the same stage, and then read it in the next script task.
The test is really simple:
it fails both if I use ${bamboo.inject.version} or $bamboo_inject_version. Actually, any script I put after the plugin always fail, in example, if I just type Write-Host "Hello" it also fails.
Any idea why?
I'm goig to answer myself, I think it was related to the encoding of the file. After saving the properties like this:
$text = "version=1.2.3"
Out-File -FilePath "${bamboo.build.working.directory}\build.txt" -InputObject $text -Append -Encoding ascii
it worked!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.