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!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.