Is there an environmental variable for Build Server URL
Hello, we have multiple TeamCity servers, I'm trying to get the build server URL on the fly, so my program can tell which server this agent it connects with.
I know there are pre-defined environmental variables like TEAMCITY_VERSION and TEAMCITY_PROJECT_NAME, but I don't see if there is one for team city server url.
Is there an env for that?
If there isn't, how can we get the server URL dynamically programmatically during the build run?
Thanks!
Please sign in to leave a comment.
Thank you for the answer!
I'm not sure if I can take advantage of it. Because in C# code, we can call GetEnvironmentVariable to get an environmental variable. Not sure how to get it as a build agent variable.