Building Extensions in VSTS and TFS

29
Tulsa TechFest 2016 Extensions in VSTS and TFS Friday, August 5 th Jeff Bramwell VP – Enterprise Architecture, Farm Credit Services of America MVP - Visual Studio & Development Technologies [email protected] ::: @jbramwell

Transcript of Building Extensions in VSTS and TFS

Orange Earth

Tulsa TechFest 2016Extensions in VSTS and TFSFriday, August 5th

Jeff BramwellVP Enterprise Architecture, Farm Credit Services of AmericaMVP - Visual Studio & Development [email protected] ::: @jbramwell

Please Be Courteous!

Please be courteous to your fellow attendeesandset your phones to vibrate or silent mode!

Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions! Please help us!Thank our Sponsors:

Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!

8/5/2016 2008 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.3

AgendaWays You Can ExtendCustom HubsCustom WidgetsCustom Build TasksService HooksMore on the MarketplaceContinuous Integration/DeliverySummary

ExtensionsLets take a deeper look at:

Ways You Can Extend

External tools such as custom command-line tools, services etc.Service Hooks can integrate with 3rd party services such as Trello, Slack, Office 365, Jenkins, HipChat and many others!Build tasks allow you to customize the tasks within a build workflow.Web UI integration allows you to provide your own UI elements within the VSTS/TFS web experience (e.g. hubs, widgets, work item extensions, etc.)6

Components of an ExtensionAn extension is made up of:

++

The JSON manifest contains metadata about the extension (e.g. name, ID, version, contributions, etc.)The discovery assets contain the markdown that describes the extension (and is displayed in the Marketplace) along with related imagesThe static files apply only to contribution-based extensions (e.g. build tasks, widgets, etc.)7

Get the Client SDKnpm install vss-web-extension-sdk

Add VSS.SDK.js to home/sdk/scripts

npm install vss-web-extension-sdk

Talk about issues with using PUT when contracts have changed (e.g. adding a new field that calling clients are unaware of and the new field ends up being nulled out on updates)8

Custom HubsLets take a quick look at:

Custom HubsRequires an HTML pageRequires a vss-extension.json manifest fileRequires a reference to the VSS.SDK.js libraryUses JavaScript and TypeScript (optional)

Hub GroupsHome: ms.vss-web.home-hub-groupCode: ms.vss-code-web.code-hub-groupWork: ms.vss-work-web.work-hub-groupBuild: ms.vss-build-web.build-hub-groupRelease: ms.vss-releaseManagement-web.hub-group-rmTest: ms.vss-test-web.test-hub-groupAdmin (collection): ms.vss-web.collection-admin-hub-groupAdmin (project): ms.vss-web.project-admin-hub-group

With the exception of the two Admin hubs, the other hubs are scoped at the Project & Team levels.

11

DemoCreating a Custom Hub

Custom widgetsLets take a quick look at:

Custom WidgetsWidgets are displayed on dashboards in VSTS/TFSVery similar to custom HubsRequires an HTML pageRequire a vss-extension.json manifest fileRequires a reference to the VSS.SDK.js libraryUses JavaScript and TypeScript (optional)

DemoCreating a Custom Widget

Custom Build TasksLets take a quick look at:

Build TasksTypically written in PowerShell and/or TypeScriptUse TypeScript for cross-platform tasksCan also integrate .NET code if desired/neededAlso requires a vss-extension.json manifest file

17

DemoCreating a Custom Build Task

Service HooksLets take a quick look at:

Service HooksBuilt-in feature of VSTS/TFSIntegrate with 3rd party servicesCan also integrate with custom servicesNo coding required to integrate with existing services

Available ServicesAppVeyorAzuquaAzure App ServiceAzure Service BusAzure StorageBambooCampfireFlowdockHipChatHubotJenkinsMyGetOffice 365SlackTrelloUserVoiceWeb HooksZapierZendesk

Web Hooks is highlighted because it provides generic support for custom services (i.e. your own services that you want to hook into)Slack is great for keeping an eye on multiple projects in VSTS/TFS. However, watch out for the number of messages being generated, especially if youre on the free Slack plan!

21

DemoSetting up a Service Hook

MarketplaceLets take another look at:

Visual Studio MarketplaceIncludes Visual Studio, VSTS and Visual Studio CodePublic preview made available last NovemberHundreds (thousands?) of extensions available nowMonetization is not yet available but is plannedUser reviews are available author can also respond to reviewsCan use web site and/or command line to publish

More information:https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/26/visual-studio-online-extensibility-and-marketplace/https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/18/announcing-public-preview-of-visual-studio-marketplace/

24

Continuous DeliveryPublished by Jesse Houwing (MVP)Publishes your extensions to MarketplaceCan be shared with one or more accountsCan override version (task and extension)Can make public or private (several options)

25

My ExtensionsVSTS-Tools Build ExtensionsMarkdown to WordPress

https://marketplace.visualstudio.com/items?itemName=moonspace-labs-llc.vsts-tools-build-extensionshttps://marketplace.visualstudio.com/items?itemName=moonspace-labs-llc.vsts-md2wp-extensionsVSTS-Tools source code on GitHub: https://github.com/jbramwell/vsts-tools

26

SummaryVSTS/TFS can be extended in many waysYou can extend your automated builds as well as the web UICustomizations can make full use of existing REST APIsBuild customizations can be Windows specific or cross-platformYou can share your extensions in the Visual Studio MarketplaceAt some point you will be able to charge for them if desiredStart here: http://bit.ly/VSTSExtensions

Questions? More Information?

Extensions Reference for VS Team Services and TFShttp://bit.ly/VSTSExtensions Brian Harry (Product Unit Manager for TFS)https://blogs.msdn.microsoft.com/bharry/My Bloghttp://blog.devmatter.com Code/Extension Exampleshttps://github.com/jbramwell/VSTS-Tools

Please Complete An Evaluation FormYour input is important!You can access Evaluation Forms at:http://TulsaTechFest.com

Fill them out!

You can win additional prizes!

Like a $50 Best Buy Gift Card!!

Winner drawn Midnight, Sun Aug 7th!

Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!

8/5/2016 2008 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.29