I am populating a pipeline variable in Powershell task and it is getting populated successfully:
$env:RESULTJSON=$json
Write-host "##vso[task.setvariable variable=testJSON]$json"
However, when I try to use it to pass the value in a command line task I am not able to do so:
task: CmdLine@2
env:
InputJSON: $(testJSON)
inputs:
script:
echo %INPUTJSON%
'jsonProcessor.exe $(Build.BuildID),%INPUTJSON%'
workingDirectory: './jsonProcExe/'
I am getting just "{" in testJSON instead of the whole JSON value.