Move build agent home folder

Answered

I am running teamcity 7 on windows. I am currently using the build agent which gets installed by default as a windows service and is located in the <teamcity>/buildAgent folder.

However, I want to move my build agent to a different drive/folder. Basically instead of <teamcity>/buildAgent , I want to move it to somethign like F:\tools\buildAgent

How do i do this? The documentation is not clear about this either.

5 comments
Comment actions Permalink

Hi

Here is the procedure:

  1. Stop the service by buildAgent\bin\service.stop.bat
  2. Unregister the service by  buildAgent\bin\service.unisnstall.bat
  3. Move the agent directory to a new location
  4. Update paths inside buildAgent\conf\buildAgent.properties
  5. Register the service again by  buildAgent\bin\service.isnstall.bat
  6. Start the service by  buildAgent\bin\service.start.bat

Michael
0
Comment actions Permalink

Michael,

Thanks, that's useful!

A colleague reports one more thing is needed: before you start the agent (after the move), make sure to clean its sources: open the agent page in the TC GUI | Clean sources on this agent | <All build configurations>. Without this, the agent will carry on building in the old folder.

Sam

0
Comment actions Permalink

The above answers didn't work in TeamCity Professional 2017.1.4.  After moving it I could no longer start the build agent.  I also couldn't find the "Clean sources on this agent" option.

0
Comment actions Permalink

Hi Stephen,

make sure the user running the agent has full permissions on the new folder. If the agent won't start, check the logs for error messages. Also please take into account that this solution was for version 7. Which version are you using now?

0
Comment actions Permalink

Thanks Denis.  I'm using TeamCity Professional 2017.1.4.

0

Please sign in to leave a comment.