API to manipulate build configuration(s)?

Hi folks -- I am in the midst of evaluating TeamCity as a replacement for CruiseControl.NET in a large and complex build system. I am trying to determine if TeamCity exposes an API that allows programmatic manipulation of build configurations -- that is, bypassing the GUI completely. For example, I need to be able to programmatically change the dependencies between two projects without pointing and clicking.

Some background: currently, our dependency management tooling is home-grown and it entails programmatically manipulating CruiseControl.NET's ccnet.config file with automation. Basically, it works something like this:

Edit dependency info in dependency XML file -----> Run tool to generate build order -----> Generate ccnet.config (with required triggers)


Now, the dependency tree for a single "leaf" project often includes on the order of tens and tens of projects and the dependencies between the hundreds of projects typically configured in CC.Net at any point in time is fairly complex -- too complex and tedious to consider modifying the ccnet.config file by hand. Hence, the automation.

Is there a way to do anything similar with TeamCity? Any thoughts would be greatly appreciated. Thanks.

2 comments
Comment actions Permalink

There is nothing currently in place to create Projects and Build configurations programmatically but I believe this is planned for the REST API. you can use the current REST API to get detaisl of the builds, changes, users, agents etc.

0
Comment actions Permalink

Paul is right, at the moment we do not provide such APIs. there is a feature request in TW-8394, you can vote for it, and subscribe for updates.
In comments there there is a workaround with direct modification of XML files in TeamCity config directory. It works for small and simple changes, but creating new configurations could be unreliable - it requires to generate IDs manually.

At the same time we're trying to adopt UI for complex environments with multiple projects. Configuration cloning can be simplified using templates, and for tasks like switch of VCS branch you can use configuration parameters.

Michael

0

Please sign in to leave a comment.