我在jenkins书上有一些条件指挥,没有给我预期的产出,因此,我打破了这些要求:
echo "PY38_RELEASE: ${env.PY38_RELEASE}"
echo "TAG_NAME: ${env.TAG_NAME}"
echo "TAG_NAME: ${env.TAG_NAME != null}"
echo "condition: ${env.PY38_RELEASE || env.TAG_NAME}"
echo "condition: ${env.PY38_RELEASE || env.TAG_NAME != null}"
然后,我观察产出。
[2024-03-14T02:18:14.115Z] PY38_RELEASE: false
[2024-03-14T02:18:14.125Z] TAG_NAME: null
[2024-03-14T02:18:14.135Z] TAG_NAME: false
[2024-03-14T02:18:14.145Z] condition: true
[2024-03-14T02:18:14.155Z] condition: true
I don t get it when the env.PY38_RELEASE
is false and env.TAG_NAME != null
is false, however their OR
is true. Where did I get it wrong?