How to update vcs root in Team City 5 through script or via http
We use custom release/build scripts to accomplish our needs. We use TeamCity 5 in our CI environment.
After each release/branch cycle I have to update the VCS root manually (pointing to new branch) . I would like to automate this. If some one could help on this regard, it will be greatly appreciated.
Please sign in to leave a comment.
There is no straight way at the moment. A bit hacky approach is to modify server configuration on disk (under .BuildServer/config directory). Server will detect modifications and re-read them.
Another way - is to write a server side plugin for this task.
Thanks Pavel.
I will try to update the config file using automated scripts and see how successful I can be. Meanwhile It would be great, if you could please let me know the details of API that I should be looking to write a plugin for this type of use case (update VCS root using external scripts ... etc). I've already read little about the interfaces available around VCS settings in TeamCity, I only could see interfaces for read operations ('getVCSroot' ... etc), I could not find any thing that can be used for write operations (updating VCS settings .... etc).
Thanks
Ganeshwaran
Hi
Your extension should use VcsManager interface. Then roots can be modified by updateVcsRoot method.
Michael
Thanx Michael,
I will try to write the plugin and let you know how it goes.
~gan