Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS...
-
Upload
patrick-patterson -
Category
Documents
-
view
217 -
download
2
Transcript of Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS...
blackmarble
the strategic IT asset for your organisation
“BUT IT WORKS ON MY PC”
OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY
Richard FennellEngineering Director
Developer Day Scotland 10th May 2008
blackmarble
AgendaAgenda
• Why do we need continuous integration?Why do we need continuous integration?
• What have we done in the past?What have we done in the past?
• CruiseControlCruiseControl
• Team Foundation ServerTeam Foundation Server
• Going Further…Going Further…
blackmarble
Why do we need continuous integration?
• Replication of development environments can be hard
• The project integration phase is hard
• It is usually attempted only at the end of the project
• It is prone to time overruns and often introduces bugs
blackmarble
What is Continuous Integration?
• Based on automated builds
• The solution is built whenever the code is changed
• Should be started as soon as possible
• And repeated as often as possible
• A core part of most Agile processes
blackmarble
Nightbuild - Batch Files
@echo offEcho Start BLACKMT buildSET ssdir=\\wellington\data\sourcesafe
echo Remove old files from DIR and create any directories requiredmd \projects\blackmtxcd \projects\blackmtx\user\nightbuild\rm /f /x /r *.*echo Get the latest files from sourcesafe"C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ss" get $\scarlet\programs\blackmtx\*.* -R -Ynightbuild,nightbuild -I- -W
Echo Build the product"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" blackmtx.dsw /MAKE "blackmtx - Win32 Release" /REBUILD /OUT build.txt
Echo Sending log file via emailc:\user\nightbuild\ParserMailer VS6 wellington [email protected] [email protected] "Night Build of Scarlet BLACKMTX.OCX - Win32 Release" build.txt
echo Build complete
@echo offEcho Start BLACKMT buildSET ssdir=\\wellington\data\sourcesafe
echo Remove old files from DIR and create any directories requiredmd \projects\blackmtxcd \projects\blackmtx\user\nightbuild\rm /f /x /r *.*echo Get the latest files from sourcesafe"C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ss" get $\scarlet\programs\blackmtx\*.* -R -Ynightbuild,nightbuild -I- -W
Echo Build the product"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" blackmtx.dsw /MAKE "blackmtx - Win32 Release" /REBUILD /OUT build.txt
Echo Sending log file via emailc:\user\nightbuild\ParserMailer VS6 wellington [email protected] [email protected] "Night Build of Scarlet BLACKMTX.OCX - Win32 Release" build.txt
echo Build complete
blackmarble
Nightbuild – did it help?
• A good start
• Provided an automated build process
• Provided a check that we had not broken any associated projects
• Good for shared libraries
• Could be extended to integrate testing and deployment
blackmarble
CruiseControl
• Originally a Java-based framework for a continuous build process
• Distributed under an open source BSD-style license and is free for use
• Ported to .NET by Thoughtworks and hosted on SourceForge as ccnet
blackmarble
CruiseControl
Image Source - http://cruisecontrol.sourceforge.net/overview.html
blackmarble
the strategic IT asset for your organisation
demodemo
Using CruiseControlUsing CruiseControl
blackmarble
CruiseControl Tips
• If it fails check the timeouts
• If it still fails check temporary files
• Look at DevEnv tasks, usually these have already done the hard work
• Have a play to see if MSBuild, nAnt or individual tasks works best for you.
• Use the community - Google like mad for tips, samples and tasks!
ExcelExcel
ProjectProject
Operations, QA Operations, QA and Help Deskand Help Desk Non-Microsoft Non-Microsoft
DeveloperDeveloper
Team System Team System Web AccessWeb Access
Visual Studio Team SystemApplication Life Cycle Management (ALM) Solution
blackmarble
TFS Build AutomationTeam Foundation
Client
Application Tier
Build Machine
Create build type Start build View Reports
Team Build Web
Services
MSBuildMSBuild
Drop Drop LocationLocation
Data Tier Sources Work items Team Build data
Team Foundatio
n warehous
e
blackmarble
the strategic IT asset for your organisation
demodemo
Using Team Build for CIUsing Team Build for CI
blackmarble
TFS versus CruiseControl
• TFS provides – Integration with the rest of the Team
Server– Unified access to all MSBuild tasks
• But at the cost of:– Cost– Have to use nested MSBUILD files– Less integration with third party tools
blackmarble
Going Further
• Building deployment systems e.g. MSI
• Automated deployments to test or to ClickOnce servers.
• Automated provisioning of virtual test environments
• Automated functional testing as well as unit testing
blackmarble
Summary
• Get an integration build going as soon as possible
• Extend it as you go along
• Make breaking the build a hanging offence
• Experiment to find out the best solution for your project – consider CI even if only a one person team
blackmarble
Good Resources
• http://blogs.msdn.com/robcaron/• http://www.martinfowler.com• http://weblogs.asp.net/rosherove/
• http://cruisecontrol.sourceforge.net/ • http://msdn.microsoft.com/vstudio/teamsystem/• http://www.nunit.org/
blackmarble
For Further Information
• My random thoughts at: http://blogs.blackmarble.co.uk/blogs/rfennell
• You can also get in touch via: Email – [email protected]
Website – www.blackmarble.co.uk