Tulsa TechFest 2016
Extensions in VSTS and TFS
Friday, August 5th
Jeff Bramwell
VP – Enterprise Architecture, Farm Credit Services of America
MVP - Visual Studio & Development Technologies
jeff@moonspace.net ::: @jbramwell
Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!
Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!
Agenda
• Ways You Can Extend
• Custom Hubs
• Custom Widgets
• Custom Build Tasks
• Service Hooks
• More on the Marketplace
• Continuous Integration/Delivery
• Summary
EXTENSIONS
Let’s take a deeper look at:
Ways You Can Extend
External
Tools
• REST APIs
• Service Hooks
Full
Integration
• Build Tasks
• Web UI Integration
Components of an Extension
An extension is made up of:
+ +
Get the Client SDK
• npm install vss-web-extension-sdk
• Add VSS.SDK.js to home/sdk/scripts
npm install vss-web-extension-sdk
CUSTOM HUBS
Let’s take a quick look at:
Custom Hubs
• Requires an HTML page
• Requires a vss-extension.json manifest file
• Requires a reference to the VSS.SDK.js library
• Uses JavaScript and TypeScript (optional)
Hub Groups
• Home: ms.vss-web.home-hub-group
• Code: ms.vss-code-web.code-hub-group
• Work: ms.vss-work-web.work-hub-group
• Build: ms.vss-build-web.build-hub-group
• Release: ms.vss-releaseManagement-web.hub-group-rm
• Test: ms.vss-test-web.test-hub-group
• Admin (collection): ms.vss-web.collection-admin-hub-group
• Admin (project): ms.vss-web.project-admin-hub-group
DEMO
Creating a Custom Hub
CUSTOM WIDGETS
Let’s take a quick look at:
Custom Widgets
• Widgets are displayed on dashboards in VSTS/TFS
• Very similar to custom Hubs
• Requires an HTML page
• Require a vss-extension.json manifest file
• Requires a reference to the VSS.SDK.js library
• Uses JavaScript and TypeScript (optional)
DEMO
Creating a Custom Widget
CUSTOM BUILD TASKS
Let’s take a quick look at:
Build Tasks
• Typically written in PowerShell and/or TypeScript
• Use TypeScript for cross-platform tasks
• Can also integrate .NET code if desired/needed
• Also requires a vss-extension.json manifest file
DEMO
Creating a Custom Build Task
SERVICE HOOKS
Let’s take a quick look at:
Service Hooks
• Built-in feature of VSTS/TFS
• Integrate with 3rd party services
• Can also integrate with custom services
• No coding required to integrate with existing services
Available Services
• AppVeyor
• Azuqua
• Azure App Service
• Azure Service Bus
• Azure Storage
• Bamboo
• Campfire
• Flowdock
• HipChat
• Hubot
• Jenkins
• MyGet
• Office 365
• Slack
• Trello
• UserVoice
• Web Hooks
• Zapier
• Zendesk
DEMO
Setting up a Service Hook
MARKETPLACE
Let’s take another look at:
Visual Studio Marketplace
• Includes Visual Studio, VSTS and Visual Studio Code
• Public preview made available last November
• Hundreds (thousands?) of extensions available now
• Monetization is not yet available but is planned
• User reviews are available… author can also respond to reviews
• Can use web site and/or command line to publish
Continuous Delivery
• Published by Jesse Houwing (MVP)
• Publishes your extensions to Marketplace
• Can be shared with one or more accounts
• Can override version (task and extension)
• Can make public or private (several options)
My Extensions
VSTS-Tools Build Extensions Markdown to WordPress
Summary
• VSTS/TFS can be extended in many ways
• You can extend your automated builds as well as the web UI
• Customizations can make full use of existing REST APIs
• Build customizations can be Windows specific or cross-platform
• You can share your extensions in the Visual Studio Marketplace
• At some point you will be able to charge for them if desired
• Start here: http://bit.ly/VSTSExtensions
Questions? More
Information?
Extensions Reference for VS Team Services and TFS
• http://bit.ly/VSTSExtensions
Brian Harry (Product Unit Manager for TFS)
• https://blogs.msdn.microsoft.com/bharry/
My Blog
• http://blog.devmatter.com
Code/Extension Examples
• https://github.com/jbramwell/VSTS-Tools
Tulsa TechFest 2016 | Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!
Your input is important!
http://TulsaTechFest.com

Building Extensions in VSTS and TFS

  • 1.
    Tulsa TechFest 2016 Extensionsin VSTS and TFS Friday, August 5th Jeff Bramwell VP – Enterprise Architecture, Farm Credit Services of America MVP - Visual Studio & Development Technologies jeff@moonspace.net ::: @jbramwell
  • 2.
    Tulsa TechFest 2016| Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!
  • 3.
    Tulsa TechFest 2016| Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions!
  • 4.
    Agenda • Ways YouCan Extend • Custom Hubs • Custom Widgets • Custom Build Tasks • Service Hooks • More on the Marketplace • Continuous Integration/Delivery • Summary
  • 5.
  • 6.
    Ways You CanExtend External Tools • REST APIs • Service Hooks Full Integration • Build Tasks • Web UI Integration
  • 7.
    Components of anExtension An extension is made up of: + +
  • 8.
    Get the ClientSDK • npm install vss-web-extension-sdk • Add VSS.SDK.js to home/sdk/scripts npm install vss-web-extension-sdk
  • 9.
    CUSTOM HUBS Let’s takea quick look at:
  • 10.
    Custom Hubs • Requiresan HTML page • Requires a vss-extension.json manifest file • Requires a reference to the VSS.SDK.js library • Uses JavaScript and TypeScript (optional)
  • 11.
    Hub Groups • Home:ms.vss-web.home-hub-group • Code: ms.vss-code-web.code-hub-group • Work: ms.vss-work-web.work-hub-group • Build: ms.vss-build-web.build-hub-group • Release: ms.vss-releaseManagement-web.hub-group-rm • Test: ms.vss-test-web.test-hub-group • Admin (collection): ms.vss-web.collection-admin-hub-group • Admin (project): ms.vss-web.project-admin-hub-group
  • 12.
  • 13.
  • 14.
    Custom Widgets • Widgetsare displayed on dashboards in VSTS/TFS • Very similar to custom Hubs • Requires an HTML page • Require a vss-extension.json manifest file • Requires a reference to the VSS.SDK.js library • Uses JavaScript and TypeScript (optional)
  • 15.
  • 16.
    CUSTOM BUILD TASKS Let’stake a quick look at:
  • 17.
    Build Tasks • Typicallywritten in PowerShell and/or TypeScript • Use TypeScript for cross-platform tasks • Can also integrate .NET code if desired/needed • Also requires a vss-extension.json manifest file
  • 18.
  • 19.
  • 20.
    Service Hooks • Built-infeature of VSTS/TFS • Integrate with 3rd party services • Can also integrate with custom services • No coding required to integrate with existing services
  • 21.
    Available Services • AppVeyor •Azuqua • Azure App Service • Azure Service Bus • Azure Storage • Bamboo • Campfire • Flowdock • HipChat • Hubot • Jenkins • MyGet • Office 365 • Slack • Trello • UserVoice • Web Hooks • Zapier • Zendesk
  • 22.
    DEMO Setting up aService Hook
  • 23.
  • 24.
    Visual Studio Marketplace •Includes Visual Studio, VSTS and Visual Studio Code • Public preview made available last November • Hundreds (thousands?) of extensions available now • Monetization is not yet available but is planned • User reviews are available… author can also respond to reviews • Can use web site and/or command line to publish
  • 25.
    Continuous Delivery • Publishedby Jesse Houwing (MVP) • Publishes your extensions to Marketplace • Can be shared with one or more accounts • Can override version (task and extension) • Can make public or private (several options)
  • 26.
    My Extensions VSTS-Tools BuildExtensions Markdown to WordPress
  • 27.
    Summary • VSTS/TFS canbe extended in many ways • You can extend your automated builds as well as the web UI • Customizations can make full use of existing REST APIs • Build customizations can be Windows specific or cross-platform • You can share your extensions in the Visual Studio Marketplace • At some point you will be able to charge for them if desired • Start here: http://bit.ly/VSTSExtensions
  • 28.
    Questions? More Information? Extensions Referencefor VS Team Services and TFS • http://bit.ly/VSTSExtensions Brian Harry (Product Unit Manager for TFS) • https://blogs.msdn.microsoft.com/bharry/ My Blog • http://blog.devmatter.com Code/Extension Examples • https://github.com/jbramwell/VSTS-Tools
  • 29.
    Tulsa TechFest 2016| Fri, Aug 5th, 2016 | OSU - Tulsa | 70+ Speakers, 20+ Tracks & 85+ Sessions! Your input is important! http://TulsaTechFest.com

Editor's Notes

  • #7 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.)
  • #8 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 images The static files apply only to contribution-based extensions (e.g. build tasks, widgets, etc.)
  • #9 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)
  • #12 With the exception of the two Admin hubs, the other hubs are scoped at the Project & Team levels.
  • #22 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 you’re on the free Slack plan!
  • #25 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/
  • #27 https://marketplace.visualstudio.com/items?itemName=moonspace-labs-llc.vsts-tools-build-extensions https://marketplace.visualstudio.com/items?itemName=moonspace-labs-llc.vsts-md2wp-extensions VSTS-Tools source code on GitHub: https://github.com/jbramwell/vsts-tools