Scripting configuration and keeping history

We are setting up TeamCity to run a complicated pipeline with several stages. Several developers to need make configuration changes to the build system.

My experience is that build servers often become snowflakes ( as configuration is manually applied over time. It becomes hard to understand why things are as they are and which aspects of the configuration are actually necessary. To combat this I would like to treat the build server as a phoenix (; to do that we need to automate the process of configuring the builds in TeamCity, so that the same configuration can be regularly applied to new servers.

Our plan to do this is to write configuration scripts which call the Rest API. I think this will work fine.

I'm trying to understand if there is any way to use this approach and also keep the history of builds from before the server was rebuilt. For example, is there any way, after configuring a build through the Rest API, to suck in previous history that has been kept in a backup? We're interested in both the build history itself (when was it run, success/failure, how long etc) and also the bulid artifacts.

I've reluctantly come to the conclusion that this might be impossible, but I would be enormously grateful for any smart ideas to help make this possible.


Please sign in to leave a comment.