How To Retrieve Build Configuration Checkout Rules from external app/script

My project is comprised of various independent source components organized into separate SVN paths so that they can be versioned independently. I have a TeamCity project with a build configuration that checks these separate source components out to the same working copy directly (SVN sees these as nested checkouts). This works great for me.

I also have to maintain a separate script that can be used to easily checkout a local working copy on a developers machine. This separate script is not used by the official TeamCity build - it is only used by developers when creating a fresh local source tree in which to work on the product.

My problem is that I currently have the SVN definition of the project in two separate places: one in TeamCity's checkout rules, the other in the developer checkout script.

I would really like to create a generic script/application that can take a TeamCity project/build configuration identifier as a parameter and then perform the local checkout to create a fresh working copy for the developers.

Is there any easy way I can retrieve the checkout rules for a project (such as an API)?

I see that you can do things like kick off a build or grab artifacts via HTTP URLs from scripts, so I'm sure I can hit the build configuration page from a script, scrape the XML to extract the checkout rules, parse them, and then perform the checkout myself, but this seems really hacky. I'm hoping there is a cleaner way to do this.

Thanks,
Jeremy

1 comment
Comment actions Permalink

You can write a plugin which will provide these details by HTTP protocol in any suitable for you format. Take a look at this: http://www.jetbrains.net/confluence/display/TCD3/DevelopingTeamCityPlugins and at our samplePlugin.zip, there you will find an example of web controller.

--
Pavel Sher

0

Please sign in to leave a comment.