Michael Stephenson

Microsoft BPM/SOA Adventures
posts - 187, comments - 185, trackbacks - 15

My Links

News

View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Archives

Post Categories

Image Galleries

BizTalk

Mates

BizTalk & Continuous Integration - Ensure builds dont conflict

Problem

We currently have a number of BizTalk Applications under development, each has its own Solution.  As we begin integrating them with Continuous Integration there will be a potential issue.  Imagine the scenario where Application A and Application B both have check-ins performed at a similar time triggering the automated build for both projects.  As both Applications depend on BizTalk if the build process does something to BizTalk it might cause the build of the other to fail.  An example of this would be if Application B's build restarted the default BizTalk In Process Host while Application A was running its unit tests.  This could cause a test in Application A to fail.

 

Note: It is recommended to beging using Continuous Integration as early as possible and preferably have it setup before you begin developing, but unfortunately we did not have this luxury.

 

Solution

At present in development we restart the Default BizTalk Windows Service.  We also execute an IISReset command for BizTalk Applications which publish or interact with Web Services.  We have made modifications to the setup of the applications so that they can all build at the same time without affecting other.  We did the following changes:

 

1.       Each application will have its own In Process and Isolated Host

 

2.       The build will stop and delete the hosts during the "Clean Up" phase of the build (Note: you will need to remove your application before deleting a host)

 

3.       The build will also Create and start the hosts in the "Setup" phase of the build

 

4.       In the build rather than doing an IISReset we will stop and start the application pools used by each web site or virtual directory related to our application

 

5.      We updated our binding files for development to use the new hosts.

 

6.       We have created some MsBuild tasks which help us do this (CreateHost, DeleteHost, StartHost, StopHost, AppPoolStart, AppPoolStop)

 

This seems to have isolated each solution development enough in what we are doing to allow them to all build at the same time.

Print | posted on Tuesday, April 24, 2007 3:58 PM | Filed Under [ BizTalk MsBuild ]

Feedback

Gravatar

# re: BizTalk & Continuous Integration - Ensure builds dont conflict

I'd usually just create one team build that built both solutions. Then you just have one deployment process to worry about and no potential conflicts.

If your application is really large that you need to split it up to avoid a lengthy team build then that is a valid concern, but I would definately stick with one team build until you hit that point.

If/when you hit that point another possible plan of attack is to keep it as one team build but check file versions and/or dates to determine what has changed and selectively build and run tests based on that info.
4/25/2007 6:44 PM | Dylan
Gravatar

# re: BizTalk & Continuous Integration - Ensure builds dont conflict

Hi Dylan,

Thanks for the feedback, some more info on this...

Assuming by Team Build you mean TFS, unfortunately we dont have that at this client, and we also have to use MKS for source control which is not pleasant compared to TFS :-)

I know what you mean about the one build approach and originally we did consider this and in addition to the build time i was also concerned by the risk that because there were a number of biztalk applications being developed but they were all at different stages we might get into the situation where Application A was required to be delivered to testing but we could not deliver it because Application B was breaking the build.

Ill post an update in a few weeks to let you know how we are getting along with the above approach

Cheers
Mike
4/26/2007 3:12 AM | Mike
Gravatar

# re: BizTalk & Continuous Integration - Ensure builds dont conflict

Mike:

Our IT shop is new to BizTalk, and we are interested in setting up a CI process for BizTalk projects. Would you give me some pointers on how to setup MSBuild to auto compile and deploy BizTalk projects. Any MSBuild scripts or resource would be great.

Thanks,

Tom
5/11/2007 1:10 PM | Tom
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: