Build Project > How to checkout different repositories in different folders - teamcity

I am new to TeamCity. I have my projects in different repositories. I want to checkout my projects in Different subfolders. e.g.
Lets suppose that I have following 3 .net Projects in three different projects.
Framework
XYZ
MyProject
Each project is stored in its own repository. MyProject contains a solution file, which expects that Framwork and XYZ Projects Folders are in main Folder so that the Folder structure looks like that
+FrameWork
-ProjectFile
-.........
+XYZ
-ProjectFile
+MyProject
-SolutionFile(has references of both Projects.)
Now my problem is I want to checkout my projects from different repositories in own Folders. How to configure it in TeamCity.
Thanks

You would need to configure each VCS Root in Version Control Settings. For each root, you can
specify what folders are of interest to you with the Checkout Rules. When creating the checkout rules, you have the option to leave the folder structure the same as it is in your VCS or you can remap the struture to suit your needs.
http://confluence.jetbrains.net/display/TCD5/2.Version+Control+Settings
http://confluence.jetbrains.net/display/TCD5/VCS+Checkout+Rules
In Order to solve the given problem. Following checkout Rules need to be applied on corresponding version control root.
+:.=>FrameWork
+:.=>XYZ
+:.=>MyProject

Related

Teamcity: versioned settings, build templates and different VCS roots

I'm trying to ensure that my entire build configuration in Teamcity is under configuration management.
But, I'm also sharing a build template across different projects (with different VCS roots). The template is used in different sub-projects in Teamcity, where the VCS root is specified.
So, when I enable Versioned Settings for the project, only the specific settings are added, not the contents of the template. And as the template are defined in the root project, I can't enable Versioned Settings at this level.
Any suggestions?
BR
Rasmus
Create or move VCS-roots in Root Project or parent project,
if you change anything in above vcs-roots you can apply it to one or all configuration, there is an option in the last section of vcs-root setting looks like

How do you reference the git repository root directory in Xcode build settings?

How do you reference the git repository root directory in Xcode build settings?
We have a project where our original source code comprises 39 modules (framework targets) spread around in various levels of subdirectories.
In addition we keep certain modules like Crashlytics in the repository root in a folder called "ThirdPartyFrameworks" and then we have "Carthage" also at the repository root.
Currently each framework references all third party dependencies through paths relative to each framework's project directory, e.g. $(PROJECT_DIR)/../../../Carthage/Build/iOS etc. However, if you want to reorganize the project, and move a project to a new spot, then all these kinds of links will break, since they're relative.
What I would greatly prefer to do is just have one shared config file that references these framework search paths like: $(GIT_ROOT)/Carthage and be done with it. However I don't see any way to reference the repo root or workspace root that way.
Does anyone know a way to do this...? Thanks.

Configure TeamCity to build from branches

I have C# project in TFS + TeamCity (TC). Now i have tag 1.0, trunk 2.0 and TC build config for 2.0.
I need to enable build for 1.0 from tag (and for future tag 2.0, 3.0, etc..).
I've created common TC project MyProject with all necessary configurations. Now i added subproject '1.0 release brunch'. And i'm goning to copy all configurations from root project + change VCS roots of that configuration. When i'll have to make tag 2.0 i'll create subproject '2.0 release brunch' and copy all root configurations to this subproject and change VCS root.
Is this normal steps to support previous projects? Should i use configuration templates or something? Each project contains 5+ configurations to build CI and Full Release builds with all changes, E2E testing, etc. So this is not just copy configuration to the subproject and change VCS root. This seems will be a tuning for every project. And i'd like to automate this as much as possible.
One way of handling this situation is to create a single build configuration and use a parameter in the VCS trunk. So instead of using a VCS root of
https://server/svn/MyProject/trunk/
you would instead use
https://server/svn/MyProject/%TagPath%/
Then create a configuration parameter in the TeamCity build configuration called TagPath and simply set it's value to trunk or tags/1.0 or whatever.
The one caveat to be aware of no matter how you do this is that you will have problems if your build process changes in the future and in that case you would probably end up creating separate "old" and "new" build configurations.
You can use Build configuration template for this. You can create the template at the root project level and then use it for sub projects.
Look at the "Redefining settings inherited from template" section in the link below on how to use parameters to change the values at the sub-project level.
http://confluence.jetbrains.com/display/TCD8/Build+Configuration+Template

Eclipse Plugin project: manage external files

I'm developing a plugin for Eclipse (4.2 on windows) that uses a bunch of external files (batch scripts, xml files, ecc).
I'm asking if there is a good method to manage those files inside the project in order to:
keep all the plugin resources inside the project for version control in SVN
possibly have an automated plugin installation (including those files outside the plugin jar)
Edit: Can an additional "Feature Project" be a solution?
Instead of having a project I would manage two: one for the plugin and one for the "feature" that references the plugin and gathers the non-plugin data.
In that case, I see that eclipse "Features" have an "installation" section (in "feature.xml"). How could I specify for each "non-plugin" file the install path location?
I'm using nested projects for this.
Create a parent project that will contain everything. For each sub-project, deactivate the default location when you create it and select the parent project's root folder instead.
Here is an example: http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/tree/
It doesn't have a .project file in the root but having one doesn't hurt.
Just remember to import the sub-projects before you start working on them. Otherwise, you and Eclipse might get confused.

Deploy solution which includes external projects

My project have the references to the bunch of projects from another solution (this solution also linked to own Git repository), but for convinience (to be able debug and modify them from one solution) I include these projects to my web-project solution which I want to deploy on AppHarbor. Maybe it could be said that these are sub-modules of my solution. But now I can't figure out proper way to deploy the solution on AppHarbor.
More structured description:
--Solution
------DeployedProject
------[SolutionFolderForExternalProjects]
---------Proj1ReferencedFromDeployedProject
----------Proj2ReferencedFromDeployedProject
Solution - linked to repo1
Proj1 and Proj2 - also belong external solution which linked to repo2, still ADDED to the repo1 explecitly -
git add SolutionFolderForExternalProjects/
How I should handle this sort of deployment?
AppHarbor really needs all dependencies pushed for us to successfully build you project. Generally, having one solution reference projects in some other random location on your local drive and checked into a different repository is probably not an optimal model. It's also bound to cause problems if some other person has to check out and build your code.
You should consider either combining the two solution structures into one repository (you can still have multiple solution files, see the AppHarbor solution file convention). Alternatively, package the respective dependencies up as NuGet packages and include them in your project using NuGet.

Resources