Top Banner
black marble the strategic IT asset for your organisation “BUT IT WORKS ON MY PC” OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering Director Developer Day Scotland 10 th May 2008
18

Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

Mar 26, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 2: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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…

Page 3: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 4: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 5: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 6: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 7: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 8: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

blackmarble

CruiseControl

Image Source - http://cruisecontrol.sourceforge.net/overview.html

Page 9: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

blackmarble

the strategic IT asset for your organisation

demodemo

Using CruiseControlUsing CruiseControl

Page 10: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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!

Page 11: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 12: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 13: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

blackmarble

the strategic IT asset for your organisation

demodemo

Using Team Build for CIUsing Team Build for CI

Page 14: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 15: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 16: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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

Page 17: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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/

Page 18: Black marble the strategic IT asset for your organisation BUT IT WORKS ON MY PC OR CONTINUOUS INTEGRATION TO IMPROVE SOFTWARE QUALITY Richard Fennell Engineering.

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