How can I speed up the build of TeamCity?

In recent months, our repository has grown significantly, and TeamCity builds have become significantly slower.

Most of the materials come from the installation files and other non-code, non-essential (for the assembly one way or another) things that people checked in SVN.

We just run the basic free version and have 3 agents. Our VCS verification mode is "Automatically on the server". 2 solution files are both C # and we use the MSBuild script.

I love the validation rules section in the build configuration, but read that it will not work because it fetches all the code, and THEN applies the rules that defeat the object if you ask me.

Now the assembly takes about 1 hour, but if I could just get TeamCity to get the code you need and nothing else, then I believe that I can get it up to 10 minutes or less.

I found several articles that exclude files and folders using MSBuild, but I can’t find anything in our build scripts related to extracting from SVN, and I think TeamCity does it.

Can anyone suggest any changes we can make, or good articles on how to build an assembly from scratch using TeamCity and MSBuild, which would allow me to choose what to choose from SVN?

Thanks.

+4
source share
1 answer
  • Build only that which changes.
  • CI builds do not need to do everything the release does. All CIs need to be compiled and some validation done.
  • Solutions, once developers put loads in any single sln. If you have many services in one sln and it builds only one change each time? So, divide them into one output per output (I mean exe or a service or something else than one DLL).
  • Parallelize assembly. You have different build goals for each release (in TeamCity).
  • Build artifacts, deploy artifacts. This means that you will never have to wait for the assembly to complete for deployment.

Ten minute synchronization is still a very long time for SVN, what really should have worked, how long does it take on the command line? Move non-assembly items to another repo?

With a large code base and svn, consider the possibility of creating the main components in the section checked in binary files / links in Svn. This allows you to share embedded objects with other teams, rather than wasting time creating your own code.

Hope this helps?

+2
source

Source: https://habr.com/ru/post/1343607/


All Articles