Roger Boesch Developer Technical Specialist Developer and Platform Group.
-
Upload
bathildis-strohschein -
Category
Documents
-
view
123 -
download
0
Transcript of Roger Boesch Developer Technical Specialist Developer and Platform Group.
![Page 1: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/1.jpg)
Become a Build Master with TFS
Roger BoeschDeveloper Technical SpecialistDeveloper and Platform Group
![Page 2: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/2.jpg)
Agenda
Was ist Build Automation?Team Foundation Server Build
Build ExecutionBuild ArchitekturContinuous Integration
DemoBuild Customization
Build DefinitionenTargets and TasksBuild API
Demo
![Page 3: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/3.jpg)
Build Automation ist nicht …
F5
![Page 4: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/4.jpg)
Die Phasen in der Build Automation sind…
Collecting
Assembling
Validating
Auditing
![Page 5: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/5.jpg)
Build Automation beantwortet folgende Fragen
Wird aus unseren Bits auch ein Produkt?Sind wir im Zeitplan?Ist die Produkt-Qualität gut?
Build Automation macht es einfach, den Puls im Team zu messen!
![Page 6: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/6.jpg)
Team Foundation Server Build
Build Automation in Visual Studio Team System
![Page 7: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/7.jpg)
Team Build 2008
Offizielle BezeichnungVisual Studio 2008 Team Foundation Server Build
Core Feature von TFS (Kein Zusatzprodukt)Umfassende, in TFS integrierte Build AutomationBietet “F5-Experience” für’s ganze TeamTeam Build benutzt MSBuild EngineTeam Build besteht aus
MSBuild Tasks für Team System Komponenten (Testing, Code Churn, Work Items Update etc.)MSBuild Project File
Erstellung im GUIDefinition der Build Optionen
![Page 8: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/8.jpg)
Build Execution
Build Initiated from TFS
Prepare build agent and create
build number
Sync Sources
Compile and Analyze
Execute Tests
Update Work Items
Calculate Code
Coverage
Calculate Code Churn
Produce Build Report
Copy to Drop
Publish Results to
TFS
Notify Event Subscribers
BuildDefinition \ TFSBuild.proj
![Page 9: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/9.jpg)
Team Build Architektur
Team FoundationServer
Build Agent
msbuild.exe
BuildDefinition\ TFSBuild.proj
msbuildm.exe
SolutionA.sln
msbuild.exe
SolutionB.sln
Calls
Compiles
Runs
![Page 10: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/10.jpg)
Power Tools
Continuous Integration in TFS 2008
submits
processes
raises
handles
queries
queues
receives
servicesstarts
raises
handles
polls
notifies
Build Service
Version Control Service
Build Agent
Notification Application
Check-in Event
Build Completion
Event
Build Build Queue
Build Definitions
Changeset
Database
Developer
![Page 11: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/11.jpg)
Build Automation
Roger BoeschDeveloper Technical SpecialistDeveloper and Platform Group
demo
![Page 12: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/12.jpg)
Team Foundation Server Build
Build Customization
![Page 13: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/13.jpg)
Anpassen der Build Definitionen
Core Build wird in TfsBuild.proj definiertCheck-out um den Build anzupassenTargets
Gruppieren einzelne Tasks und definieren die ReihenfolgeErlaubt es einzelne Bereiche aus der Kommandozeile aufzurufen
TasksTasks definieren Operationen, die in einzelnen Managed Assemblies liegenStellen den Code zur Verfügung, der während des BuildEigene Tasks können erstellt werden
Implementieren von ITaskAbleiten von der Helper Class Task
![Page 14: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/14.jpg)
Team Build Managed API
Zugriff auf die selbe API wie Team BuildErlaubt die volle Automatiserbarkeit der UI-Funktionen und mehr...Gute Basis zur Integration von bestehenden Build Systemen (Nant, Ant, make etc.) in Team Build
![Page 15: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/15.jpg)
Build customizen
Properties um den Build zu kontrollieren
Build Targets die überschrieben werden können
IncrementalGet StopOnFirstFailure
IncrementalBuild CleanCompilationOutputOnly
SkipWorkItemCreation
UpdateAssociatedWorkItemsOnBuildBreak
SkipLabel SkipGetChangesetsUpdateWorkItems
BeforeOnBuildBreak BuildNumberOverideTarget
BeforeCompile BeforeEndToEndIteration
BeforeTest AfterEndToEndIteration
PackageBinaries Before/After everything!
![Page 16: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/16.jpg)
Team Build API Beispiel
C#TeamFoundationServer tfs =
TeamFoundationServerFactory.GetServer(“http://tfsserver:8080”);
IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
IBuildDefinition buildDef = buildServer.GetBuildDefinition("TeamProject", "Build Name");
buildServer.QueueBuild(buildDef);
VB.NET
Dim tfs As TeamFoundationServer = TeamFoundationServerFactory.GetServer("http://tfsserver:8080")
Dim buildServer As IBuildServer = DirectCast(tfs.GetService(GetType(IBuildServer)), IBuildServer)
Dim buildDef As IBuildDefinition = buildServer.GetBuildDefinition("TeamProject", “Build Name")
buildServer.QueueBuild(buildDef)
![Page 17: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/17.jpg)
Build Customization
Roger BoeschDeveloper Technical SpecialistDeveloper and Platform Group
demo
![Page 18: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/18.jpg)
Drei Dinge die man sich merken sollte
MSDN HelpUnderstanding Team Foundation Build Configuration Fileshttp://msdn2.microsoft.com/en-us/library/ms400710(VS.90).aspx
Microsoft.TeamFoundation.Build.targets file%ProgramFiles%\MSBuild\Microsoft\VisualStudio\TeamBuild\
Microsoft.TeamFoundation.Build.targets
!! DIESE DATEI NIEMALS EDITIEREN !!
Viele Angepasste Tasks sind bereits verfügbar – “Suchen“ bevor man selber zu programmieren beginnt
![Page 19: Roger Boesch Developer Technical Specialist Developer and Platform Group.](https://reader036.fdocuments.net/reader036/viewer/2022062318/55204d7549795902118ca042/html5/thumbnails/19.jpg)
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.