Derik Whittaker

Syndication

News


Showing Potential Merge Issues in Hudson

As we are moving from our old build product (cron jobs which simply call a NAnt script) over to our new build server Hudson there are a TON of things we are trying to add.  One of the new features is the ability to perform dry-run merges from our trunk against a branch each night to see how stable/unstable our branch has become compared to our trunk.

Setting up the build to do the Dry-run merge (svn merge URL –dry-run) is really straight forward.  All you really need to do is add the following NAnt task.

lt;target name="perform.source.dry.run.merge">   
<exec program="svn" output="dryRunMergeOutput.txt">     <arg line="merge URL_TO_SOURCE --dry-run" />   
</exec> 

</target>

The nant task above will reach out to the command line SVN client and provide the correct merge syntax to tell SVN to do a merge, but do it as a dry run (will simulate the merge and report status).  We are telling nant to pipe the output from the call into a text file.  Pushing this into a text file will later allow us to read in that text file from Hudson and return the information.

Now that we have the dry-run merge results we need to tell Hudson what to do with the results.  For this we are using the Task Scanner Plugin.  This plugin is not explicitly designed for this usage, but it can scan files looking for keywords, so it will work.

Setting up the plugin can be done in the same manner as the image below.

SettingUpTaskPlugin

Taking a look at what we actually did, you can see that we are telling the plugin to scan the file we created during our dry-run merge.  We are then providing different keywords to be scanned (C , Skipped  for High and A , U for Low).  When you provide these keywords the plugin will then parse your file looking for these and then report them.  When it is done with this process it will generate 2 graphics for you.

The first is this one and it is a simple graph that shows your trend over time (this graph does not have much to it).  The red items represent High items, the yellow is for Normal items (would be blue if there were Low items).

ChatForTasksPlugin

The other graphic that it creates is a listing of each line in the file that has the keywords.  You can see this below.

OpenTaskList

As you can see, setting up hudson to do a dry-run merge and reporting the results is pretty straight forward.  Hope this helps someone else.

Till next time,


Posted 06-11-2009 8:21 PM by Derik Whittaker
Filed under: ,

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)