I've recently created a new teamcity server and have built a little .net app which given a name of a branch in VCS and a list of names of modules, it will send off various api calls to create a series of teamcity projects and builds.
This app makes the following calls in order to do the above.
- Create a parent project to represent the branch of code
- Create a sub-project for a given module
- Create an appropriate vcs root
- Create a build configuration
- Pause the build configuration
- Create build step to "build and test" the module
- Create nunit build feature
- Create VCS trigger
- Create build parameters
- Create build setting to ensure a clean build
- Create build setting to set build number
- Create build setting for artifact rules
- Create build agent requirement
- Unpause build configuration
- Add build to queue
This process is nice as all our builds get generated in a repeatable, automated way. If we wish to tweak builds, we adjust scripts and regenerate builds.
This does produce the builds we're expecting but the problem we have is around 200 builds with each build requiring 15 api calls takes a long time, if we have 1000+ builds already in teamcity.
Is there any way I can combine any of the above calls together as I know there isn't a POST on the project level containing all the above settings?