How to get url of server in script

Is there a property or environment variable or some other way to dynamically get the TeamCity Url that the job would be running under from a build script?
I don't want to hard-code a url path into my scripts and I am using the REST API.


1 comment
Comment actions Permalink


There is no ability to get server url to use it inside the build script. Please watch/vote for the feature request
Also, you can probably write a custom plugin.

Kind regards,

Please sign in to leave a comment.