Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improving Your Build Process

Or, actually establishing a build process when there isn't much of one in place to begin with.

Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step builds, neither of which exists in any form whatsoever).

What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta.

Relevant Tools: Visual Build Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.)

Tentatively, I've got a Visual Build project that does this:

  1. Get source and place in local directory, including necessary DLLs needed for project.
  2. Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use).
  3. Build using Visual Studio
  4. Precompile using command line, copying into what will be a "build" directory
  5. Copy to destination.
  6. Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps.

I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet.

Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping).

like image 237
peacedog Avatar asked Aug 18 '08 16:08

peacedog


People also ask

What is meant by build process?

The term build may refer to the process by which source code is converted into a stand-alone form that can be run on a computer or to the form itself. One of the most important steps of a software build is the compilation process, where source code files are converted into executable code.

What is build process in DevOps?

What Is Build Automation in DevOps? Build automation is the process of automating the retrieval of source code, compiling it into binary code, executing automated tests, and publishing it into a shared, centralized repository. Build automation is critical to successful DevOps processes.

Which is an ideal tool at the build stage?

Maven can be used by Jenkins as a build tool. If Gradle and Maven are compared then Gradle is faster than Maven as it provides the features of Incrementality, Build Cache, and Cradle Daemon.


1 Answers

When taking on a project that has never had an automated build process, it is easier to take it in steps. Do not try to swallow to much at one time, otherwise it can feel overwhelming.

  1. First get your code compiling with one step using an automated build program (i.e. nant/msbuild). I am not going to debate which one is better. Find one that feels comfortable to you and use it. Have the build scripts live with the project in source control.
  2. Figure out how you want your automated build to be triggered. Whether it is hooking it up to CruiseControl or running a nightly build task using Scheduled Tasks. CruiseControl or TeamCity is probably the best choice for this, because they include a lot of tools you can use to make this step easier. CruiseControl is free and TeamCity is free to a point, where you might have to pay for it depending on how big the project is.
  3. Ok, by this point you will be pretty comfortable with the tools. Now you are ready to add more tasks based on what you want to do for testing, deployment, and etc...

Hope this helps.

like image 172
Dale Ragan Avatar answered Oct 02 '22 17:10

Dale Ragan