OK. Is it available in your build server? I take it you are using the Docker executor? What is your parent image?
One approach you can take here is to run a set command in a step on its own, this will dump all env vars. See if the one you want is in there first. Python definitely won’t be able to see it if it is not in there!
Here is a portion of my config. (This is the part that is failing on the $OSTYPE call.) the checkout and setup steps work. The error occurs during the run step while running the unit tests.
In the setup step the $OSTYPE environment variable is available. I use it to distinguish between macos and linux. Here is a snippet from my setup.sh script:
if [[ $OSTYPE == darwin* ]]; then
tag="MacOSX"
tag2="darwin"
elif [[ $OSTYPE == linux* ]]; then
tag="Linux"
tag2="linux"
fi
There must be something in python that is annoying it and causing it to be blank. I’m not well versed in python so would love other thoughts. Are you using the same version of python locally?