Making Sure A Script Is Running In TC

Hi,

What's the best way to make sure a script is running in the TeamCity environment?  Some of my scripts will need to do different things depending on whether or not they are being executed by TeamCity.  Is there particular way that is generally used to verify this?

Thanks,
-T

2 comments
Comment actions Permalink

TeamCity defines additional environment variables.
For example, you can check presence of %TEAMCITY_VERSION%

0
Comment actions Permalink

Excellent! thanks!
-T

0

Please sign in to leave a comment.