Refresh environment variable for Build Agents without disconnection.
For example, if I want to update the environment variable for build agent. I need modify it on the agent like either through command '[Environment]::SetEnvironmentVariable("Path", "newpath", [System.EnvironmentVariableTarget]::Machine)' , or add 'env.Path' in buildagent.properties file.
The first methods will not get the environment variable update unless I restart the 'TeamCity Build Agent' service, the second methods will cause few seconds disconnection after modifying buildagent.properties file. These two methods will both lead to disconnection for a little bit while.
Is there a way to refresh the environment variable for build agent and will not cause disconnection. maybe like an api, call this api and it will let TC server refresh a certain build agent?
Please sign in to leave a comment.