I have below conditional logic in the Drone YAML, but I saw that the control is not going inside that, even though drone branch is "develop". How to fix this, did I do anything wrong?
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}