Ayshine
Ayshine

Reputation: 11

TFS 2015 Git Repository Build Get only Relevant files

Recently I have been configuring TFS 2015 Git Repository for my company. I have a 8GB main branch with multiple solutions in it. Every solution should be build seperately. Every solution does not need all the data in this branch. Is there a way to configure build each solution only gets related files not whole branch ?

Also my solutions have 5 folders , 1 folder has references to other four. Only this one folder's built version is what I am looking for. Is there a way to tell "only drop this folder for me" ?

Upvotes: 1

Views: 372

Answers (2)

Ayshine
Ayshine

Reputation: 11

Actually, we found the solution. When choosig the source folder on the Copy stage I chose only the subfolder I needed.

Upvotes: 0

jessehouwing
jessehouwing

Reputation: 114731

The way cloning a git repository works it will always get the whole repository, there is no way around that other than splitting up your solutions into separate repo's and using something like NuGet packages to re-use the output from one build into anther build.

As such there is no way to tell the build agent to only fetch specific files.

To improve the performance, make sure your build agent doesn't delete the repository after a build and is able to re-use the existing clone. That way it only has to fetch the delta, making it much, much faster.

To only publish the files you're after, adjust the "Copy and publish" task at the end of your build to use a different source path. That part is possible and quite simple to achieve.

Upvotes: 1

Related Questions