Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build or Rebuild on the build server (CI server)

I am running TeamCity to build a .NET project (several projects to be more exact).

Should i be using Rebuild target or Build target?

I would like to minimize the build time, while not producing any newer versions of projects that haven't changed.

Is this safe practice to use "Build" target? what if the previous project outputs were erased? how do i verify that i can be doing this safely?

like image 412
lysergic-acid Avatar asked Nov 22 '11 12:11

lysergic-acid


People also ask

What is the purpose of a build server?

A build server ensures that only the proper code goes into the build. Developers play with new software products, utility libraries or other tools on their local machines. Installing and uninstalling these tools can leave stray DLLs behind that may be mistakenly used in the build.

What is server build process?

A build server is a tool that enables Continuous Integration, an excellent practice to follow when developing software. Build servers are commonly referred to as continuous integration servers or simply CI servers.

What is build server in Devops?

CI servers (also known as build servers) automatically compile, build, and test every new version of code committed to the central team repository, ensures that the entire team is alerted any time the central code repository contains broken code.

Is TeamCity a build tool?

TeamCity is a build management and continuous integration server from JetBrains. It was first released on October 2, 2006 and is commercial software and licensed under a proprietary license: a freemium license for up to 100 build configurations and three free Build Agent licenses are available.


1 Answers

You should use rebuild if you need to rebuild all the projects, for instance in order to get coherent timestamps or version numbers (though usually, a change in a linked AssemblyInfo.cs will trigger a build as well.)

Build is completely safe even if the build output from a previous build is gone, or even if the build happens to be done on a new build agent which has no build output. In that case, all necessary projects will be built.

However, you might have custom MSBuild steps in your sln/csproj files that depends on a (Re)build, in which case you need to be more careful, but other than that, go for Build if you want to.

like image 169
Lasse V. Karlsen Avatar answered Sep 29 '22 23:09

Lasse V. Karlsen