Release Management with Visual Studio Team Services and Office Dev PnP
-
Upload
petter-skodvin-hvammen -
Category
Software
-
view
227 -
download
0
Transcript of Release Management with Visual Studio Team Services and Office Dev PnP
![Page 1: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/1.jpg)
![Page 2: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/2.jpg)
Release Management with Visual Studio Team Services and Office Dev PnP
Petter Skodvin-HvammenPrincipal Consultant, Puzzlepart, Norway
@pettersh | skodvinhvammen.wordpress.com | [email protected]
![Page 3: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/3.jpg)
Session Goals
1. Introduction to Release Management2. How does it work in Visual Studio Team Services3. Introduction to Office Dev PnP4. How can we release to SharePoint (and other)
There will be plenty of examples and demos...
![Page 4: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/4.jpg)
What is Release Management?
“Release management is the process of managing, planning, scheduling and controlling a software build through different stages and environments; including testing and deploying software releases”
https://en.wikipedia.org/wiki/Release_management
In Visual Studio Team Services Service that helps you automate the deployment and testing of your software in multiple environments.
![Page 5: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/5.jpg)
Why Release Management?
• You spend to much time on planning and deploying changes
• There are too many manual stepsrisk of failure
• It is not clear what feature or fix is released to which environment
• One-click deploy to all of your environments on-demand
• Schedule deployments• Automatically deploy when
code changes• Roll back to previous version
easily• Control who can release to
each environment• Track the releases across
environments
![Page 6: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/6.jpg)
Release Definitions
Specifications of
• What to deploy? Artefacts• Where to deploy?
Environments• How to deploy? Tasks
![Page 7: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/7.jpg)
What to Deploy?
• Build server outputs:• Team Services (VSTS)• Team Foundation Server
(TFS)• Jenkins• TeamCity
• Version control sources:• TFVC, Git and GitHub
• Other sources:• NuGet• PowerShell• Cmd and Shell
![Page 8: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/8.jpg)
Where to Deploy?
• Environments• Environment Templates• Approvals and approvers• Environment Variables• Deployment Triggers• Queueing Policies
![Page 9: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/9.jpg)
How to Deploy?https://www.visualstudio.com/en-us/docs/build/define/build
Custom build tasks/extensions
https://www.visualstudio.com/en-us/docs/integrate/extensions/develop/add-build-task
http://blog.devmatter.com/custom-build-tasks-in-vso
![Page 10: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/10.jpg)
DEMO
![Page 11: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/11.jpg)
Office 365 Dev Patterns & Practices (PnP)https://github.com/OfficeDev/PnP-Sites-Core https://github.com/OfficeDev/PnP-PowerShell https://github.com/OfficeDev?query=office-ui-fabric (http://dev.office.com/fabric)
![Page 12: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/12.jpg)
Office 365 Developer PnP Core Componenthttps://github.com/OfficeDev/PnP-Sites-Core
• .NET library aimed to ease working with CSOM/REST api• If you prefer Configuration as Code (using C#)• Available as NuGet package
![Page 13: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/13.jpg)
Configuration as Code
![Page 14: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/14.jpg)
Office 365 Developer PnP PowerShell Componenthttps://github.com/OfficeDev/PnP-PowerShell
• PowerShell commands for working with SharePoint Online and On-Premises
• If you prefer Configuration by Declaration (using XML/JSON)• Available from the PowerShell gallery using the PowerShellGet module
![Page 15: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/15.jpg)
Declarative Configuration
![Page 16: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/16.jpg)
Build and Release using Office Dev PnP 1. Code in VSTS Git, continuous build/deploy, hosted agent, PnP-Sites-Core2. Code in GitHub, no build, scheduled deploy, hosted agent, PnP-PowerShell3. Code in BitBucket, nightly build/deploy, agent in Azure, PnP-PowerShell
![Page 17: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/17.jpg)
DEMO
Scenario 1
• Code in https://pettersh.visualstudio.com/espc16• Continuous builds (on commit)• Continuous deploy (on successful build)• Cloud hosted VSTS agent• Provisioning using PnP-Sites-Core
![Page 18: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/18.jpg)
DEMO
Scenario 2
• Code in https://github.com/pskodvin/espc16-github • No builds (no triggers defined)• Scheduled deploy• Cloud hosted VSTS agent• Provisioning using PnP-PowerShell
![Page 19: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/19.jpg)
DEMO
Scenario 3
• Code in https://bitbucket.org/puzzlepart/hoegh-o365-intranet
• Scheduled builds• Continuous deploy (on successful build)• Azure hosted VSTS agent• Provisioning using PnP-PowerShell
![Page 20: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/20.jpg)
Relevant Topics
Some related thoughts and ideas worth considering
• Automatically create labels, tags or branches• Automatically relase when a pull request is accepted and successfully
built• Automatically provision or decommission virtual machines using ARM• Automatically create news, blog posts, SharePoint items, Yammer
posts,…• Deploy to
• SharePoint on-premises• Azure web jobs• Provider hosted apps• Microsoft graph
![Page 21: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/21.jpg)
Summary
• Visual Studio Team Services• Build and Release Management• Office Development Patterns & Practices (PnP)
![Page 23: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/23.jpg)
Backup slidesIn case of connectivity issues (oh nooooo….)
![Page 24: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/24.jpg)
Scenario: Continuous Build and Deploy using PnP CoreCode in VSTS Git, Hosted agent
![Page 25: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/25.jpg)
![Page 26: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/26.jpg)
![Page 27: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/27.jpg)
![Page 28: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/28.jpg)
![Page 29: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/29.jpg)
![Page 30: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/30.jpg)
![Page 31: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/31.jpg)
![Page 32: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/32.jpg)
![Page 33: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/33.jpg)
![Page 34: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/34.jpg)
![Page 35: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/35.jpg)
![Page 36: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/36.jpg)
![Page 37: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/37.jpg)
![Page 38: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/38.jpg)
![Page 39: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/39.jpg)
![Page 40: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/40.jpg)
![Page 41: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/41.jpg)
![Page 42: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/42.jpg)
Scenario: No Build, Scheduled Deploy using PnP-PowerShellCode in GitHub, Hosted build agent
![Page 43: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/43.jpg)
![Page 44: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/44.jpg)
![Page 45: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/45.jpg)
![Page 46: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/46.jpg)
![Page 47: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/47.jpg)
Scenario: Scheduled Build and Deploy using PnP-PowerShellCode in BitBucket, Build agent in Azure VM
![Page 48: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/48.jpg)
![Page 49: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/49.jpg)
![Page 50: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/50.jpg)
![Page 51: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/51.jpg)
![Page 52: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/52.jpg)
![Page 53: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/53.jpg)
![Page 54: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/54.jpg)
![Page 55: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/55.jpg)
![Page 56: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/56.jpg)
![Page 57: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/57.jpg)
![Page 58: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/58.jpg)
![Page 59: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/59.jpg)
![Page 60: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/60.jpg)
![Page 61: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/61.jpg)
PnP-PowerShell on a hosted build agent• Windows Server 2012 R2, 64-bit, with Windows PowerShell 4.0• PnP-PowerShell is NOT installed!• How to install PnP-PowerShell?
• Install-Module (requires PowerShell 5.0/5.1)• Installer MSI from
https://github.com/OfficeDev/PnP-PowerShell/releases • Clone https://github.com/OfficeDev/PnP-PowerShell.git or
download zip
![Page 62: Release Management with Visual Studio Team Services and Office Dev PnP](https://reader035.fdocuments.net/reader035/viewer/2022062400/58ad051d1a28ab0b408b4bd5/html5/thumbnails/62.jpg)
PnP-PowerShell on your own build agentSetup as a Virtual Machine in Azure• Windows Server 2012 R2, 64-bit, with Windows PowerShell 4.0• Install PnP-PowerShell from PowerShell Gallery or using MSI from
GitHubhttps://github.com/OfficeDev/PnP-PowerShell/releases
• Install other requirements like Node.js, NPM, Typings, Gulp, etc….• Install
https://github.com/Microsoft/vsts-agent/releases/download/v2.108.0/vsts-agent-win7-x64-2.108.0.zip