Trying to set up a hello world pipeline which echo's a variable I pass in. Need to trigger via API. I have the trigger working but I can't get my variable printing to the console.
I've defined a variable called myVar
Including the PAT conversion as it might save someone else the 3hrs it took me to track down the correct combo.
MY_PAT=abc1234
B64_PAT=$(printf "%s"":$MY_PAT" | base64)
curl -X POST https://dev.azure.com/***/test/_apis/pipelines/123/runs?api-version=6.0-preview.1 \
-H Authorization: Basic $64_PAT \
-H Content-Type: application-json
{
"parameters": "{ \"myVar\": \"foo\" }"
}
My task is a command line script (task 2.*):
echo Hello world
echo $(myVar)