Tfs Build vNext (Jelle Druyts)

Post on 15-Apr-2017

613 views 3 download

transcript

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

2http://www.visug.be

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

CompuwareCorporation Page 4

Team Build Extensibility Points

Home > Team Build

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

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

CompuwareCorporation Page 7

Scheduling A Build Call TFSBuild through a Windows Scheduled Task

Home > Customization Scenarios

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

Build Workflow Customization

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!

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

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

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

Definition Auditing• Who changed what in the build and why

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

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

Definition Templates• Create standard build templates for teams to consume

Works Side By Side with existing XAML Builds

Build Architecture

21Microsoft Confidential

Agent Pool• Scoped to TFS Application Tier

• Can be shared across multiple project collections

22Microsoft Confidential

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

Build Agents• Installing Build Agent

24Microsoft Confidential

Queue • Provides access to a pool of

agents• Each queue is dedicated to a

specific TPC

25Microsoft Confidential

Better Control of Agent Routing• Build Agent capabilities

• Auto discovered• Add your own

• Specify build agent requirements for the definition

26

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

• Queue• Variables• Demands

• Validate shelveset

27

Running multi configuration build• Define the

configuration variables• In options tab point to

the variable• Select other options• Queue a build

28

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)