ci with team system

Upload: fogobr8469

Post on 04-Mar-2016

214 views

Category:

Documents


0 download

DESCRIPTION

Continuous Integration with Team SystemMicrosoft based

TRANSCRIPT

  • Continuous Integrationwith & without Team SystemRoy OsheroveTeam Agilewww.TeamAgile.comBlog: www.ISerializable.com

  • Context

  • Why should I care?Typical Integration phase in a projectLongHardSweatyYoud like to finish as soon as possibleYou wont respect yourself in the morningYoud like toWork lessMake more moneyRespect yourself in the morning

  • What is it?Integrate your codeAutomated BuildRun TestsDeploy to various places (Test, Staging)Review failures to integrateDo this continuouslyOn every check-inEvery X minutes

  • Build AutomationNo human interaction neededTryGets latest source versionCompiles all configurationsRun all unit testsRun all automated functional/Integration testsDeploy to Test, StageReport SuccessCatch (Exception)Report Failure Compile failedTest failed

  • Build automation toolsTeam SystemMSBuildTeam Foundation Server Build Server3rd party commercial toolsFinalBuilderVisual BuildFree/Open source toolsNAnt

  • CI toolsTeam SystemMSBuildTeam Foundation Server Build ServerContinuous Integration tool for VSTS3rd party commercial toolsFinalBuilderVisual BuildFree/Open source toolsNAntCruise Control/Draco.NET/Hippo.NET

  • Nant

  • NAntThree conceptsTask = Single predefined build actionTarget = User-defined collection of tasksDependency = Relationships or requirements between targets

    Large # of Tasks in NAnt and NAnt ContribEx: CSC Task for building C# code

    By default, NAnt looks for .build file in dirCan change build by use of PropertiesEasy transition to MSBUILD in Whidbey

  • DemoNAnt

  • Why NAnt?Much better than Make/NMakeInstead of shell commands, extended via Task classesInstead of writing shell commands, configuration file XMLXML calls target tree, running various tasksPower to work anywhere on anythingNo VS.NET neededNAnt has many .NET Tasks built-inNAnt makes life easier makes repeatable builds much easier

  • Why Not Nant?XML EditingTools are not matureHard to maintain (but better than nothing!)

  • Nant (2)

  • DemoFinalBuilder

  • Build automation with FinalBuilder

  • MSBuild.exeFeels like Nant (XML Based)Extensible through interfaces and inheritanceBasic engine under Visual Studio and Team Build

  • The Building BlocksOverall architecture of MSBuild and Team Build.NET Framework 2.0 Redist

  • Team BuildProcess

  • Team BuildArchitectureTeam Foundation ClientApplication TierBuild Machine Create build type Start build View ReportsTeam Build Web ServicesMSBuildDrop LocationData Tier Sources Work items Team Build dataTeam Foundation warehouse

  • Team BuildBuild ExecutionGet sources from source control

  • DemoTeam Build XML FilesTfsBuild.proj

  • Scheduled BuildOpen Scheduled TasksAdd command line"d:\Program Files\Microsoft Visual Studio 8\Common7\IDE\TfsBuild.exe"

    start

  • From Automationto Continuous IntegrationCruise ControlTeam System Events

  • What is CruiseControl?Automated Continuous Integration server, implemented in .NET Framework Open source, originally ThoughtWorkshttp://continuousintegration.net/Can integrate with many source controls, NAnt, NUnit, MSBUILD, FxCop, NCover

  • CCTray

  • DemoCruise ControlVSSVS 2003

  • My ListenerWeb ServiceEventing ServicesRegistrations

  • Implementing CI with TFSIntercept eventsCheckinListen via web serviceInvoke build via Team System APIsOr: Use CruiseControl.NETInvoke MSBuild

  • DemoIntercept a Check-In using a web service

  • What other events can we catch?Specify an EventBuildCompletionEvent BuildStatusChangedEvent BranchMovedEvent NodeCreatedEvent NodePropertiesChangedEvent NodeRenamedEvent NodesDeletedEvent ProjectCreatedEvent ProjectDeletedEvent CheckinEvent WorkItemChanged Filter Expression

    E.g.:

    Visual Studio Event Filter Language

    +TeamProject = MyProjectName AND PolicyOverrideComment

  • DemoStart a TFS build from code

  • DemoWeb Service Templates

  • DemoPre built CI Web Service

  • SummaryAutomate as much as you canThe more you integrate, the less you sufferIf you start early, its not much work3rd party commercial tools can save a lot of money

    Team system CI tools are not yet very matureBut it is VERY extensibleIf you have Team system invest in Team System CIUnless you are on a tight budget

  • Its dark in my company Im sitting here trying to get the build to work All the errors are very meaningful

  • If I ran a daily build Then maybe Id find this sooner rather than later All the errors are very very meaningful

  • If my build had passed Id be home right now maybe having a sex But instead Im here now

  • Wish Id listened to Roy

  • I wanna be so agile

  • Wanna deal with changes and bugs more truthfully Wanna be so agile If I could only take over my company

  • Still, Im here nowAll the errors are very meaningful

  • Thank [email protected]

    ********************************* 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.*************