How to check if my bash script is running inside a TeamCity agent? Follow
Hi,
I want to add a condition like this to a shell script:
if running inside TeamCity then
echo "Inside TeamCity"
else
echo "Not inside TeamCity"
fi
There are a bunch of environment variables that I can use to do this -- but what is the proper way of doing it?
Please sign in to leave a comment.
You can check for presence of this environment variable: TEAMCITY_VERSION
It is always set for a running build.