Tfs Build vNext (Jelle Druyts)

30
TFS/VSTS Build vNext ehmm vCurrent – or is it vFuture? Jelle Druyts

Transcript of Tfs Build vNext (Jelle Druyts)

Page 1: Tfs Build vNext (Jelle Druyts)

TFS/VSTS Build vNext ehmm vCurrent – or is it vFuture?Jelle Druyts

Page 2: Tfs Build vNext (Jelle Druyts)

2http://www.visug.be

Page 3: Tfs Build vNext (Jelle Druyts)

CompuwareCorporation Page 3

Team Build MSBuild Engine on a production server Used for

– Deployment builds (Alpha, Beta, RC, RTM, SP, ...)– Nightly Builds– Continuous Integration– Automated testing– Calculating static code metrics– ...

Home > Team Build

Page 4: Tfs Build vNext (Jelle Druyts)

CompuwareCorporation Page 4

Team Build Extensibility Points

Home > Team Build

Page 5: Tfs Build vNext (Jelle Druyts)

CompuwareCorporation Page 5

Customization Scenarios Updating the assembly version number Packaging a build Copying a build Creating a work item on a broken build Scheduling a build

Home > Customization Scenarios

Page 6: Tfs Build vNext (Jelle Druyts)

CompuwareCorporation Page 6

Packaging A Build MSBuild doesn’t support Visual Studio Setup Projects Need to build MSI’s on the build server

– Use Visual Studio on the build server (vs.Licenses++)

Home > Customization Scenarios

Page 7: Tfs Build vNext (Jelle Druyts)

CompuwareCorporation Page 7

Scheduling A Build Call TFSBuild through a Windows Scheduled Task

Home > Customization Scenarios

Page 8: Tfs Build vNext (Jelle Druyts)
Page 9: Tfs Build vNext (Jelle Druyts)

Introduction• Team Foundation Build is highly customizable• TFS 2010 introduces new infrastructure

• TFS TPC Build Controller Build Agent

• Based on Windows Workflow Foundation 4 for control flow• Compilation still based on MSBuild (parity with Visual Studio)

• Has a learning curve but quickly pays off• Typically start from built-in template

Page 10: Tfs Build vNext (Jelle Druyts)

Build Workflow Customization

Page 11: Tfs Build vNext (Jelle Druyts)
Page 12: Tfs Build vNext (Jelle Druyts)

Ok ok – seriously: on to 2015!• Build “vNext” == vCurrent == v3

• Extensible cross-platform task and build engine• Windows agent for Windows based development• Xplat agents that run on Mac and Linux – Built on Node.js!

Page 13: Tfs Build vNext (Jelle Druyts)

Define A Build• Edit in the web using build steps (task library)

Page 14: Tfs Build vNext (Jelle Druyts)

Run unit tests and publish results• Run unit tests for just about any framework

• JUnit• VSTest• NUnit• XUnit

• Publish test results to and include them in the build summary

Page 15: Tfs Build vNext (Jelle Druyts)

Real-time Build Status• Live console view in the web with real time status of each task

Page 16: Tfs Build vNext (Jelle Druyts)

Definition Auditing• Who changed what in the build and why

Page 17: Tfs Build vNext (Jelle Druyts)

Definition Diff• Build definitions are JSON and can be diffed in web UI

Page 18: Tfs Build vNext (Jelle Druyts)

Secret Variables• Lock a variable to hide it from the web and store it in a strong box

Page 19: Tfs Build vNext (Jelle Druyts)

Definition Templates• Create standard build templates for teams to consume

Page 20: Tfs Build vNext (Jelle Druyts)

Works Side By Side with existing XAML Builds

Page 21: Tfs Build vNext (Jelle Druyts)

Build Architecture

21Microsoft Confidential

Page 22: Tfs Build vNext (Jelle Druyts)

Agent Pool• Scoped to TFS Application Tier

• Can be shared across multiple project collections

22Microsoft Confidential

Page 23: Tfs Build vNext (Jelle Druyts)

Build Agents• Each agent is connected to a pool• Install as many agents as you want on any machine

• No more limitation of “1 TPC per Controller and 1 Controller per Machine” • Agents on the same machine can be shared across different pools and queues

• Agents are automatically updated • Add your own “capabilities “

• Non-Windows OS’s use “Cross Platform Build Agents”• Open sourced at https://github.com/Microsoft/vso-agent

23Microsoft Confidential

Page 24: Tfs Build vNext (Jelle Druyts)

Build Agents• Installing Build Agent

24Microsoft Confidential

Page 25: Tfs Build vNext (Jelle Druyts)

Queue • Provides access to a pool of

agents• Each queue is dedicated to a

specific TPC

25Microsoft Confidential

Page 26: Tfs Build vNext (Jelle Druyts)

Better Control of Agent Routing• Build Agent capabilities

• Auto discovered• Add your own

• Specify build agent requirements for the definition

26

Page 27: Tfs Build vNext (Jelle Druyts)

Queue a build • Web browser based• Can change settings for the current build

• Queue• Variables• Demands

• Validate shelveset

27

Page 28: Tfs Build vNext (Jelle Druyts)

Running multi configuration build• Define the

configuration variables• In options tab point to

the variable• Select other options• Queue a build

28

Page 29: Tfs Build vNext (Jelle Druyts)

Summary• New build capabilities open TFS/VSTS for true cross-platform

development• Side-by-side with XAML builds• More flexible pool/agent/queue architecture• Extensible task library• Template are still limited for now (e.g. no inheritance)