Exporting projects and build configuration
HI,
Is there a possibility to export and import configuration for projects and builds ? We need this in the course of our evaluation of TeamCity because each developper is working (in a ClearCase environment) in its own branch. So we cannot share a single server. (Of course, in production, configuration would be different).
Please sign in to leave a comment.
Configurations are stored on disk in XML format, you can copy them to another server. But you should be aware that builds history is stored in database and will not be copied. Also if another server already has a number of build configurations you will need to change project, build configuration and VCS root identifiers in the copied files because they should be unique.
I had already copied the .BuildServer file.
I already tried to start the server on the new machine to have it create a new .Buildserver and the copied the content of the config sub folder. I am getting the following error for every project:
Critical error in configuration file /home/gdautun/.BuildServer/config/BusinessCommon/project-config.xml:
Error on line 27 of document file:/home/gdautun/.BuildServer/config/BusinessCommon/project-config.xml: Element type "dependencies" must be declared.
On one project, the message is different:
Critical error in configuration file /home/gdautun/.BuildServer/config/UtilCommonLib/project-config.xml:
Error on line 2 of document file:/home/gdautun/.BuildServer/config/UtilCommonLib/project-config.xml: Document is invalid: no grammar found.
It seems you did not copy *.dtd files. These files are required too.
I now copied all *.dtd files that are present in the config directory. But as soon as the server is started, the files are modified. For example, in the file project-config.xml, the line:
<!ELEMENT build-type (description?, options?, (run-parameters|parameters|requirements|build-triggers|artifact-publishing|artifact-dependencies|dependencies|keep|vcs-entry-ref)*)>
is replaced with:
<!ELEMENT build-type (description?, options?, (run-parameters|parameters|requirements|build-triggers|artifact-publishing|artifact-dependencies|keep|vcs-entry-ref)*)>
It seems the server you start is older then the one from which you copied files. It is impossible to use config files of the newer server with previous version of TeamCity.
That was effectively the major cause of problem. However, we have now a remaining problem (on both the original and copy server):
Critical error in configuration file /home/psaumont/.BuildServer/config/UtilCommonLib/project-config.xml:
org.jdom.input.JDOMParseException: Error on line 2 of document file:/home/psaumont/.BuildServer/config/UtilCommonLib/project-config.xml: Document is invalid: no grammar found.
The project has been created normally and has worked fine yesterday. It has no dependencies and the config file contains:
<?xml version="1.0" encoding="UTF-8"?>
<settings />
I do not know how it occured but your project-config.xml actually contains data of plugin-settings.xml, the file names are similar, probably project-config.xml file was overwritten by mistake.
Thanks, it's working fine now.