我在 Drone YAML 中有以下条件逻辑,但我看到控件不在其中,即使无人机分支是“开发”。如何解决这个问题,我做错了什么吗?
commands:
- "./gradlew clean build"
- echo "${DRONE_BRANCH}"
- echo "${DRONE_BRANCH}" = "develop"
- >
if [ "${DRONE_BRANCH}" = "develop" ]; then
export CLOUD_USER_KEY=$STAGE_CLOUD_USER_KEY
export HOST_NAME="11.22.111.111"
fi
- >
if [ "${DRONE_BRANCH}" = "master" ]; then
export CLOUD_USER_KEY=$PROD_CLOUD_USER_KEY
export HOST_NAME="11.22.111.112"
fi
- echo "CLOUD_USER_KEY "${CLOUD_USER_KEY}
- echo "HOST NAME "${HOST_NAME}