Please see the code below. It is unable to print the variable right after set.variable task! I had feelings and tried as well that NOTHING below the set.variable task will be executed at all. This is so annoying and How can I solve it?
- bash: |
echo "##vso[task.setvariable variable=BUILD_NUMBER]$(Build.BuildId)"
echo $(BUILD_NUMBER) // BUILD_NUMBER: command not found
displayName: Set
- bash: |
echo "you shall saw build id below"
echo $(BUILD_NUMBER) // Same line and this is OK!
displayName: Print