Top Banner
62

Release Management with Visual Studio Team Services and Office Dev PnP

Feb 22, 2017

Download

Software

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Release Management with Visual Studio Team Services and Office Dev PnP
Page 2: Release Management with Visual Studio Team Services and Office Dev PnP

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

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

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

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

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

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

Where to Deploy?

• Environments• Environment Templates• Approvals and approvers• Environment Variables• Deployment Triggers• Queueing Policies

Page 10: Release Management with Visual Studio Team Services and Office Dev PnP

DEMO

Page 11: Release Management with Visual Studio Team Services and Office Dev PnP

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

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

Configuration as Code

Page 14: Release Management with Visual Studio Team Services and Office Dev PnP

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

Declarative Configuration

Page 16: Release Management with Visual Studio Team Services and Office Dev PnP

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

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

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

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

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

Summary

• Visual Studio Team Services• Build and Release Management• Office Development Patterns & Practices (PnP)

Page 22: Release Management with Visual Studio Team Services and Office Dev PnP

puzzlepart.com

Twitter: @pettershBlog: skodvinhvammen.wordpress.comEmail: [email protected]

Page 23: Release Management with Visual Studio Team Services and Office Dev PnP

Backup slidesIn case of connectivity issues (oh nooooo….)

Page 24: Release Management with Visual Studio Team Services and Office Dev PnP

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
Page 26: Release Management with Visual Studio Team Services and Office Dev PnP
Page 27: Release Management with Visual Studio Team Services and Office Dev PnP
Page 28: Release Management with Visual Studio Team Services and Office Dev PnP
Page 29: Release Management with Visual Studio Team Services and Office Dev PnP
Page 30: Release Management with Visual Studio Team Services and Office Dev PnP
Page 31: Release Management with Visual Studio Team Services and Office Dev PnP
Page 32: Release Management with Visual Studio Team Services and Office Dev PnP
Page 33: Release Management with Visual Studio Team Services and Office Dev PnP
Page 34: Release Management with Visual Studio Team Services and Office Dev PnP
Page 35: Release Management with Visual Studio Team Services and Office Dev PnP
Page 36: Release Management with Visual Studio Team Services and Office Dev PnP
Page 37: Release Management with Visual Studio Team Services and Office Dev PnP
Page 38: Release Management with Visual Studio Team Services and Office Dev PnP
Page 39: Release Management with Visual Studio Team Services and Office Dev PnP
Page 40: Release Management with Visual Studio Team Services and Office Dev PnP
Page 41: Release Management with Visual Studio Team Services and Office Dev PnP
Page 42: Release Management with Visual Studio Team Services and Office Dev PnP

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
Page 44: Release Management with Visual Studio Team Services and Office Dev PnP
Page 45: Release Management with Visual Studio Team Services and Office Dev PnP
Page 46: Release Management with Visual Studio Team Services and Office Dev PnP
Page 47: Release Management with Visual Studio Team Services and Office Dev PnP

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
Page 49: Release Management with Visual Studio Team Services and Office Dev PnP
Page 50: Release Management with Visual Studio Team Services and Office Dev PnP
Page 51: Release Management with Visual Studio Team Services and Office Dev PnP
Page 52: Release Management with Visual Studio Team Services and Office Dev PnP
Page 53: Release Management with Visual Studio Team Services and Office Dev PnP
Page 54: Release Management with Visual Studio Team Services and Office Dev PnP
Page 55: Release Management with Visual Studio Team Services and Office Dev PnP
Page 56: Release Management with Visual Studio Team Services and Office Dev PnP
Page 57: Release Management with Visual Studio Team Services and Office Dev PnP
Page 58: Release Management with Visual Studio Team Services and Office Dev PnP
Page 59: Release Management with Visual Studio Team Services and Office Dev PnP
Page 60: Release Management with Visual Studio Team Services and Office Dev PnP
Page 61: Release Management with Visual Studio Team Services and Office Dev PnP

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

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