Case study of applying continuous integration for enterprise project

March 16 20093 Commented

Categorized Under: Agile, Engroup, Management, Osgi, Software Development Process, Technology

Continuous integration is one of good development practices that we apply in many projects before. We try to integrate the code of every body as soon as possible (usually developers check in whenever they finish their small tasks and within a day), make the automation test (unit test and integration test) and we have a dedicated build server schedule get the latest code, run test automatically and make the delivery. In this blog, I will give an example of applying continuous integration practice in our latest challenging project, its name is Engroup.
Development Context:

  • Engroup is the mix project of Java and Flash/Flex with server side is written by Java and front-end is developed by Flex.
  • Now, there are many projects:
    • Engroup server has 29 sub-projects (include test projects for Engroup modules and documentation project). The number of projects would be increased in future. Maven is the main tool to build Engroup server projects. In some cases, we combine with Ant via maven-ant tasks to utilize Ant power to support doing tasks that Maven can't.
    • Engroup client has 18 sub-projects. Ant is the main tool to build Engroup client projects by mainly using Flex-Ant task also our custom tasks to generate the code from Engroup server.
  • Developers commit code daily.
  • Long list of project dependencies: Engroup module projects depend on Engroup core and common modules.
  • Back-end services must have unit test for its implementation.
  • Database backup must be generated in every build and Engroup installer must be available in every successfully build.

Related build tools:

  • Hudson (https://hudson.dev.java.net/): one of the best CI Java build server. Simple to run, simple to use. Have many plug-ins and a clean dashboard to follow the build status.
  • Nexus (http://nexus.sonatype.org/): a powerful and robust Maven manager. Nexus is very easy to use and we deploy our Engroup server modules to our nexus server.
  • Maven (http://maven.apache.org): an excellent build tool. A must tool for any Java projects.
  • Ant (http://ant.apache.org): another excellent Java build tool. A must tool for any Java projects. A combination of Ant and Maven strengthen the power of each tool.

Our standard build process:

  1. CI server (Hudson) will get the latest sources from SVN server.
  2. Build Engroup projects order depends on project dependencies.
  3. Run unit test.
  4. Make the reports (thanks for the help of Maven): checkstyle, pmd, junit, cobertura.
  5. Deploy Engroup modules to maven repository manager if the build is success.
  6. Back up database if all module builds are success.
  7. Make the Engroup installer.

Manage projects and build process by CI server (Hudson)

It is fairly easy to create the new build job on Hudson, create 'Create Job' link at Hudson CI server and simply fill necessary information
Project Configuration

You can integrate Unit test, checkstyle, cobertura, pmd to project dashboard by selecting them in build settings section.
Project Build Settings
And you could manage builds and its status on dashboard page, for multiple projects it is better if you customize the list view of modules. For example, in our project we make the customization view for client and server view also view of common artifacts (documentations, installer).
CI Dashboard

Monitor project health
We can manage the health of project via the following factors:

  • Build status: how many failure or success of builds.
  • Build warnings: compiler warnings, code warnings (checkstyle, violations) or defined threshold of checking tools (unit test coverage, findbugs)
  • Other information: code metrics, duplicate code, source code.
  • Project information: development information, license, source repository etc

Project Dashboard
Go to the Maven site to see project information:

Project Site

and we can visit some sections to see the detail:
Test Coverage
The values of applying CI in our project:

Applying continuous integration in our project give us many advantages:

  • The whole process is automated (even backup database task) - no manual task in our build process. No any human mistake causes the build broken, no build check-list is needed any longer.
  • Feedback to development status as soon as possible via unit test result and code warnings and some useful metrics.
  • Give the project status as you need.
  • Managing multiple projects status in one place.
  • Developer could get the latest other works as soon as possible (thanks for nexus - open source maven repository).

Applying CI in your project should be the good option for your project as we get in our projects. Just takes some hours to make all things are run properly but the benefits you have is far greater than the effort you spent. Let's try, see and enjoy!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • blinkbits
  • BlinkList
  • blogmarks
  • BlogMemes
  • BlogMemes Cn
  • BlogMemes Fr
  • BlogMemes Jp
  • BlogMemes Sp
  • Blogosphere News
  • Blogsvine
  • blogtercimlap
  • Book.mark.hu
  • Bumpzee
  • co.mments
  • connotea
  • De.lirio.us
  • Design Float
  • DotNetKicks
  • DZone
  • eKudos
  • email
  • Fark
  • Faves
  • feedmelinks
  • Fleck
  • Furl
  • GeenRedactie
  • Global Grind
  • Gwar
  • Haohao
  • HealthRanker
  • Hemidemi
  • Identi.ca
  • IndianPad
  • Internetmedia
  • kick.ie
  • Kirtsy
  • laaik.it
  • Leonaut
  • LinkaGoGo
  • LinkArena
  • LinkedIn
  • Linkter
  • Live
  • Ma.gnolia
  • Meneame
  • MisterWong
  • MisterWong.DE
  • muti
  • MyShare
  • MySpace
  • N4G
  • Netvibes
  • Netvouz
  • NewsVine
  • NuJIJ
  • Ping.fm
  • PlugIM
  • Pownce
  • ppnow
  • Print
  • Propeller
  • Ratimarks
  • Rec6
  • Reddit
  • SalesMarks
  • Scoopeo
  • scuttle
  • Segnalo
  • Shadows
  • Simpy
  • Slashdot
  • Smarking
  • Socialogs
  • SphereIt
  • Spurl
  • StumbleUpon
  • Symbaloo
  • Taggly
  • TailRank
  • Technorati
  • ThisNext
  • Tipd
  • Tumblr
  • TwitThis
  • Upnews
  • Webnews.de
  • Webride
  • Wikio
  • Wikio FR
  • Wikio IT
  • Wists
  • Wykop
  • Xerpi
  • Yahoo! Buzz
  • YahooMyWeb
  • Yigg

Related posts:

  1. The first time of applying Test Driven Development for .NET project I have applied unit test while programming Java before but...
  2. Implementing enterprise integration solutions with Spring Integration In our last project, we faced 2 challenges of how...
  3. Preconditions of applying Agile process Probably you already hear Agile process at least one time...
  4. Using Spring Integration in Osgi platform How to use Spring Integration in Osgi platform. This post...

3 Responses to “Case study of applying continuous integration for enterprise project”

  1. Simonn says:

    Great post, but its a bit long and most people like short and sweet posts!

  2. admin says:

    Simonn, it depends on writing topics. Short and simple blog always in our mind in writing :)

  3. Dynalite says:

    You wouldn’t believe this but I have spent all day researching for some articles about this. Thanks for this, it was a thought provoking read and really helped me out. Kind regards,

Leave a Reply