Change configuration settings over REST API Follow
Can i change configuration settings over REST API (say, detach from vcs root) or through other remote control mechanism?
I read http://confluence.jetbrains.net/display/TW/REST+API+Plugin, but nothing like this did not find.
Please sign in to leave a comment.
Hi Pavel
The plugin does not support this yet, please vote for TW-8394.
Some actions like starting or tagging a build can be done by direct HTTP calls: Accessing Server by HTTP.
Other settings can be changed by direct modification of server's configuration files: Direct Modifications of Configuration Files.
I could really use this, also creating a new Build Type from an existing Template.
I notice the current sources to the REST API seem to be at http://svn.jetbrains.org/teamcity/plugins/rest-api/ -- is that the case?
If so, I might just add a couple of features to it for my use case.
Looking at the source, the configuration settings just seems to be a need to wire up the BuildTypeSettings.getConfigParameters() in the same way that getBuildParameters() is currently wired?
> http://svn.jetbrains.org/teamcity/plugins/rest-api/ -- is that the case?
Yes. The recommended approach is to copy the plugin, change it's name and binding URL in teamcity-plugin.xml and then deploy as custom one.
If your concern is jetbrains.buildServer.server.rest.model.buildType.BuildType.getParameters, then you can replace myBuildType.getBuildParameters() to myBuildType.getParameters()
BTW, this specific to add config parameters will be included into 7.0.
Got it working now, thanks Yegor!
Is 7.0 going to have access to build Templates as well? I _may_ need this, not sure yet.
So, I am pressing ahead with some changes I need to the REST API as the existing code is very well structued :) so it is easy to extend to do what I want.
In the spirit of open source code I have a github repository set up for my changes: https://github.com/mcmarkb/teamcity-rest-api/tree/Eluru-6.5.x which I am making to the current branch rather than the master as I assume that has Teamcity 7.x dev stuff in it.
(I chose github because git should make it easy to see the diffs, as most of my changes should be very easy to apply to another branch, even if manually)
I've added config parameters into the regular <parameters> section as you suggested Yegor, and am now adding templates - not creating, just retrieving and seeing which template is used by a BuildType, as that will be useful to me.
Cheers,
Mark