Secrets passed as bamboo variables are empty in bash script

Viewed 461

I have a couple of secrets added as variables in Bamboo enter image description here

but when I try to access them from my bash script they're empty.

echo "executing: $OPERATION" 
    $bazel test //...:all --build_tests_only --test_output=errors \
    --test_env MONGO_USERNAME_INTEGRATION_TEST_SECRET="${bamboo_MONGO_USERNAME_INTEGRATION_TEST_SECRET}" \
    --test_env MONGO_PASSWORD_INTEGRATION_TEST_SECRET="${bamboo_MONGO_PASSWORD_INTEGRATION_TEST_SECRET}" \
    --test_env MONGO_CLUSTER_INTEGRATION_TEST_SECRET="${bamboo_MONGO_CLUSTER_INTEGRATION_TEST_SECRET}"
    ;;

Any idea what might be the problem here?

1 Answers

When task started Bamboo prints all environment variables available for it. Use them as reference

Related