请看下面的代码。在set.variable任务之后无法立即打印变量!我有感觉并尝试过set.variable任务下面的任何内容都不会被执行。这太烦人了,我该如何解决?
- 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