How to do DevOps with the SharePoint Framework and why it matters? Vincent Biret Azure and Office 365 developer @ 2toLead Microsoft Office Dev MVP @baywet Bit.ly/vince365
Devs, Product Owners, Deciders, QA, Project Managers… For whom this session is?
Agenda •The new stack for SharePoint Framework •Intro to Software lifecycle + devops •Intro to Visual Studio Team Services Azure DevOps •The build system + deploy •Unit tests with SPFX •Intro to tech debt management •Conclusion
Ready?
The new stack A modern tooling for developers
Have you already seen these slides? Question! •Who has never heard about the SharePoint Framework before this talk?
The Short Version • New Tools! • Front End only! • Local And Remote Workbench • Closed source relying on open source • First and third party
The webpart project Demo
Software lifecycle Where it all begins
From the delivery team’s perspective, DevOps is about automating the process, releasing frequently, and leveraging telemetry as well as feedback to improve solutions DEVOPS BASICS Idea/Need Market
Visual Studio Team Services Azure DevOps Let’s talk about tooling
Formerly Visual Studio Team Services Azure DevOps • TFS as a service/modular • Updated more frequently • Pay per user/build • Everything except • SharePoint Integration • Process Template Customization** • Data Warehouse
Branch management Code as a team, not a guy in a cave
Git is great with branches and cross platform, it has become an industry standard Gitflow is a great process for DevOps teams and allows them to scale seemlessly Git + git flow • Git is a decentralized source control technology • Branches are cheap • Merging is not a nightmare • Cross platform • Lot of tools • Git flow is a process model for branch management • Focused work • Easy context switching • Standard and no thinking required • Semver…
Pull requests are a great way to help your team grow and to improve the quality of the code PEER REVIEWS AND QUALITY « Here are a bunch of changes in the code, please review it and make it part of the main code » Also check if changes: Build Pass unit tests Pass static analysis gate (code quality) Have associated work items (context/documentation) And allows: For discussion The team to grow together
Build Let’s increase the quality of releases
Automated builds •Predictable result •Constant quality •Time saving
Used to be called build 2015, do not use XAML builds Pipelines (build) •JSON definition •Web edition •Lot of third parties integrations •Tasks on GitHub! (see notes) •Agent auto updates!
Agents •Hosted Agents •BaaS •Installed Agents •Azure, or anywhere else
Build pipelines Demo
Deploy Automate all the things!
Pick and choose! Different schools •Source promotion •We promote to next level a certain state of source •Rebuild if needed •Build promotion •Exact same binaries are promoted
Pipelines (release) •Same technology as the build •Notion of environments •Approvals
Release Management Demo
Tests
Tests levels •Unit testing •Load testing •Integration testing •System testing •Functional/Acceptance testing
Tests types •Installation •Compatibility •Regression •Destructive •Security •L17N/I13N •A/B •…..
Test tooling Runners Assertion libraries Emulators/Env Reporters Frameworks Stubing/Mocking Karma Chai + as promised PhantomJS Junit Mocha Sinon MSTest MS.Test ns Node (backend) Coverage Casper Istanbul Chrome Cobertura Jasmine … … …
Unit tests of demo webpart Demo
I wish Microsoft added Istanbul and Jest as supported choices My thoughts on Microsoft’s choices • Microsoft should not impose the test stack • It should be a choice • Like you choose between React/Knockout/Nothing • The Karma+webpack/Chai/phantomJS/Mocha stack has flows • Slow • Losing community support • Hard to remap for coverage/integration
Technical debt management Or how to avoid digging your own grave
What is tech debt? •Code we’re not comfortable with •Preventing us from innovating •Causing a lot of support •Stressful for the team
Solutions? •Rewrite everything every 2 years •Pair coding •Static analysis + linting
SonarQube, linting for demo webpart Demo
Conclusion
Conclusion •Lot of time saved •Consistent builds •Automated tests •Quality increased •Money saved
Bit.ly/vince365 @baywet slideshare.net/VincentBIRET Thanks! Questions? http://bit.ly/az-sq http://bit.ly/spfx-devops

#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?

Editor's Notes

  • #2 To add your image, please insert your picture and scale it to be bigger than the size of the white box shown.
  • #3 Devs, devops, qa people, deciders Why should you care? ALM = time saved, happy devs, money saved and better products/services
  • #5 Gestion des questions, interaction, ok avec ce programme?
  • #19 https://www.visualstudio.com/get-started/overview-of-get-started-tasks-vs Unlimited storage, team projects, everything, 5 free users, free for users with msdn subscriptions, free for stakeholders Data Warehouse can be replaced by powerbi or dashboard being delivered http://blog-eng.dbtek.it/2014/03/visual-studio-online-vso-vs-team.html https://azure.microsoft.com/en-us/pricing/details/devops/azure-devops-services/
  • #25 New, hasn’t yet the build quality information and integration with RM + tests manager. https://github.com/Microsoft/vsts-agent-tasks Don’t use XAML builds! It’s old and difficult
  • #26 Build as a Service (billed by minutes building), Hosted agents have foundation edition of sharepoint installed. Installed agents only need internet access.
  • #30 powershell + Tasks = quick win Tip: use –verbose everywhere!
  • #31 Use Office 365 + CDN to quickly RM to an environment https://www.eliostruyf.com/automate-publishing-of-your-sharepoint-framework-scripts-to-office-365-public-cdn/ https://dev.office.com/blogs/office-365-public-cdn-developer-preview-release
  • #33 Authentication and authorization is a whole session by itself and is advanced. For the interest of time, we’ll skip it today
  • #35 Goal of this section is not to cover everything, but more what we can achieve in the SharePoint world
  • #36 Runners: take care of running the tests and provide the infrastructure for (memory, processes…) Asseration libraries: « ways » to write your unit tests Emulators (or environments): context within the tests will run (server with node, browser, emulated browser…) Reporters: take care of writing down tests results in comprenhensive format Frameworks: provide a suite of functionnalities to help implement testing Stubing/Mocking-Faking/Spying: allows you to isolate the tested code and/or observe behavior
  • #41 If the static analysis could be automated, wouldn’t be it great?
  • #44 Money save = dev time saved, less support to provide, better product/service
  • #45 This is the Pre-Title Screen. Please do not place any content on this screen.