This section details creating projects via the TeamCity web UI. Other options include the REST API and using TeamCity project configuration in DSL based on the Kotlin language.
Creating Project
To create a project, use the Administration link at the top right corner and click Create project. The Create project page is displayed.
To create a subproject, go to the parent project settings page and create a subproject using one of the available options.
Creating project pointing to repository URL
On the Create project page, select to create project from a repository URL.
Specify the project settings:
Setting
Description
Parent Project
Select the parent project form the drop-down.
Repository URL
A VCS repository URL. TeamCity recognizes URLs for Subversion, Git and Mercurial. TFS and Perforce are partially supported.
Username
Provide username if access to repository requires authentication
Password
Provide username if access to repository requires authentication
Click Proceed. TeamCity will configure the rest of settings for you.
it will determine the type of the VCS repository, auto-configure VCS repository settings, and suggest the project and build configuration names:
the project, build configuration and VCS root will be created automatically
TeamCity will add a VCS build trigger.
TeamCity will attempt to auto-detect build steps: Ant, NAnt, Gradle, Maven, MSBuild, Visual Studio solution files, PowerShell, Xcode project files, Rake, and IntelliJ IDEA projects.
On the Auto-detected Build Stepspage select the detected step(s) to use in your build configuration. Click Use selected. If no steps found, you will have to configure build steps manually.
Your project and a build configuration are configured. Click the Run button to start the build. Depending on the build configuration settings, TeamCity can suggest some additional configuration options. Review Suggestions at the end of the settings list and configure required ones.
Creating project pointing to GitHub.com repository
On the Create project page, select to create project from GitHub.com.
If you do not have a GitHub connection configured, you will be redirected to the Connections page. Set up the connection asdescribed here, then follow the steps below.
If you have a GitHub connection configured, follow the steps below.
Select a repository. TeamCity will verify the repository connection. If the Connection is verified, the new page opens.
TeamCity will display the project and build configuration name. If required, modify the names and click Proceed.
TeamCity will add a VCS build trigger and attempt to auto-detect build steps: Ant, NAnt, Gradle, Maven, MSBuild, Visual Studio solution files, PowerShell, Xcode project files, Rake, and IntelliJ IDEA projects. On the Auto-detected Build Stepspage select the detected step(s) to use in your build configuration. Click Use selected. If no steps found, you will have to configure build steps manually.
Your project and a build configuration are configured. Click the Run button to start the build. Depending on the build configuration settings, TeamCity can suggest some additional configuration options. Review Suggestions at the end of the settings list and configure required ones.
Creating project pointing to Bitbucket Cloud
On the Create project page, select to create project from Bitbucket Cloud.
If you do not have a Bitbucket connection configured, you will be redirected to the Connections page. Set up the connection as described here, then follow the steps below.
If you have a Bitbucket connection configured, follow the steps below.
Select a repository. TeamCity will verify the repository connection. If the Connection is verified, the new page opens.
TeamCity will display the project and build configuration name. If required, modify the names and click Proceed.
TeamCity will add a VCS build trigger and attempt to auto-detect build steps: Ant, NAnt, Gradle, Maven, MSBuild, Visual Studio solution files, PowerShell, Xcode project files, Rake, and IntelliJ IDEA projects. On the Auto-detected Build Stepspage select the detected step(s) to use in your build configuration. Click Use selected. If no steps found, you will have to configure build steps manually.
Your project and a build configuration are configured. Click the Run button to start the build. Depending on the build configuration settings, TeamCity can suggest some additional configuration options. Review Suggestions at the end of the settings list and configure required ones.
Creating project pointing to Visual Studio Team Services
On the Create project page, select to create project from Visual Studio Team Services.
If you do not have a Visual Studio Team Services connection configured, you will be redirected to the Connections page. Set up the connection as described here, then follow the steps below.
If you have a Visual Studio Team Services connection configured, follow the steps below.
Select a repository. TeamCity will verify the repository connection. If the Connection is verified, the new page opens.
TeamCity will display the project and build configuration name. If required, modify the names and click Proceed.
TeamCity will add a VCS build trigger and attempt to auto-detect build steps. On the Auto-detected Build Stepspage select the detected step(s) to use in your build configuration. Click Use selected. If no steps found, you will have to configure build steps manually.
Your project and a build configuration are configured. Click the Run button to start the build. Depending on the build configuration settings, TeamCity can suggest some additional configuration options. Review Suggestions at the end of the settings list and configure required ones.
Creating project manually
Click the Create project button and select Manually.
On the Create New Project page, specify the project settings:
You can view all available projects and subprojects on the Projects Overview page listed in the alphabetical order by default. Administrators can customize the default order.
To copy, move, delete or archive a project, use the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page. These options are not available for the Root project.
Copying Project
Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
Projects can be copied and moved to another project by project administrators.
You can copy a project into the same or another parent.
On copying, TeamCity automatically assigns a new name and ID to the copy. It is also possible to change the name and ID manually. Selecting the Copy project-associated user, agent and other settings option makes sure that all the settings like notification rules or agent's compatibility are exactly the same for the copied and original projects for all the users and agents affected. You can also opt to copy build configurations build numbers.
note
When running TeamCity in the Professional mode, the Copy option will not be displayed for a project if the number of build configurations on the server after copying will exceed the limit (1 00 build configurations since TeamCity 2017.2 and 20 in earlier versions unless you purchased additional Build Agent licenses).
Moving Project
warning
Before moving the project, consider the following:
TeamCity assigns user roles on aper-project basis, which means that moving a project may result in changing the scope of user permissions in the new project (new permissions may be added or the existing permissions can be dropped)
Connection to Git VCS Roots containing SSH keys may get unavailable after a project move
To move a project, u se the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page. Please refer to the dedicated page.
Bulk Editing IDs
warning
Care must be taken when performing this action. Modifying the ID will change all the URLs related to the project. It is highly recommended to update the ID in any of the URLs bookmarked or hard-coded in the scripts. The corresponding configuration and artifacts directory names on the disk will change too and it can take time.
Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
The current project and build configuration IDs are displayed. You can modify or reset the IDs for all subproject, VCS roots, build configurations and templates. Click Regenerate to get new Ids automatically or edit them manually.
Click Submit.
Pausing / Activating Triggers
You can pause triggers for all or selected build configurations of a project. Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
Exporting Project
You can export configuration files of a project with its children to move it to a different TeamCity server. Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
Deleting Project
Use the corresponding item from the Actions menu in the top right of the project settings page or the more button next to the project on the parent project settings page.
When you delete a project, TeamCity will remove its .xml configuration files. After the deletion, the project is moved to the<TeamCity Data Directory>/config/_trash/.ProjectID.projectN directory. There is a configurable timeout (5 days by default) before all project-related data stored in the database (build history, artifacts, etc.) of the deleted project is completely removed during the next build history clean-up. You can restore a deleted project before the clean-up is run.
The <TeamCity Data Directory>/config/_trash/ directory is not cleaned automatically and can be emptied manually if you are sure you do not need the deleted projects.
tip
If you attempt to delete a project with dependent build configurations from other projects, TeamCity will warn you about it. If you proceed with the deletion, the dependencies will no longer function.