I have the following command to set a BASE_URL variable in Azure DevOps yaml:
- script: |
echo "##vso[task.setvariable variable=BASE_URL;]$(PROD-CONTAINER-URL)"
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
However whenever I echo the variable then it looks like this:
https://google.com"
If I replace it with a single quote or put the $(PROD-CONTAINER-URL) inside or outside the quotes then the problem still persists. How can I get around this and what causes it?
Just as in kap's answer, I saw the same behavior this week and resolved by turning off bash debugging around the variable output lines, for example:
set +x
echo "##vso[task.setvariable variable=BASE_URL;]$(PROD-CONTAINER-URL)"
set -x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With