2
votes

I have a git repository for a project with a .teamcity folder in it containing versioned teamcity settings. Assuming I have deleted this project from the teamcity server (by first disabling versioned settings and then deleting the project) how can I re-import it?

The use case here is being able to create a new project using a template generator, e.g. yeoman or dotnet new, and be able to import that easily into a parent TeamCity project.

Our current teamcity version is: TeamCity Enterprise 10.0.4 (build 42538), so things may have improved in later versions.

1

1 Answers

0
votes

So I think I have figured this out, these are the steps that worked for me.

  1. Create a new project, making sure the Project ID is set correctly
  2. Add a VCS root pointing to your repo that contains your project
  3. Enable versioned settings making sure to select use settings from VCS and choosing the Kotlin settings format
  4. Select "Import settings from VCS" when prompted

In more detail...

Make sure the Project ID for your project matches what you have in your .teamcity file

For example if your .teamcity file contains .teamcity\MyAwesomeProject, then you need to make sure your Project ID in teamcity is set to MyAwesomeProject.

use settings from VCS

If you don't tell TeamCity to use the vcs settings by default then it will do what it usually does and start checking things into source control for you.