Implement SPFx (SharePoint Framework) deployment with DevOps using SharePoint ALM Commands & Blob Storage
Azure DevOps (Visual Studio Team Services / Team Foundation Server) consists of a set of tools and services that help developers implement DevOps, Continuous Integration, and Continuous Deployment processes for their development projects.
This article explains the steps involved in setting up your Azure DevOps environment with Continuous Integration and Continuous Deployment to automate your SharePoint Framework builds, unit tests, and deployment.
SharePoint ALM (Application Life Cycle Management) APIs provide simple APIs to manage deployment of your SharePoint Framework solutions and add-ins across your tenant or Site Collection level.
ALM APIs can be used to perform exactly the same operations that are available from a UI perspective
Continuous Integration
Continuous Integration (CI) helps developers integrate code into a shared repository by automatically build and packaging the solution each time new code changes are submitted.
Setting up Azure DevOps for Continuous Integration with a SharePoint Framework solution requires the following steps:
Office Azure & SharePoint ALM - Build Pipeline
- Node 10.x
- Gulp Clean
- Gulp Build
- Gulp Bundle --ship
- Gulp Package-Solution --ship
- Publish Build Artifacts (Task Version 1)
- "Display Name" -> Publish Artifact: CDN
- "Path to Publish" -> temp/deploy
- "Artifact Name" -> CDN
- "Artifact Publish Location" -> Azure Pipeline
- Publish Build Artifact
- "Display Name" -> Publish Artifact: App
- "Path to Publish" -> sharepoint/solution
- "Artifact Name" -> App
- "Artifact Publish Location" -> Azure Pipeline
Continuous Deployment
Continuous Deployment (CD) takes validated code packages from build process and deploys them into a staging or production environment. Developers can track which deployments were successful or not and narrow down issues to specific package versions.
Setting up Azure DevOps for Continuous Deployments with a SharePoint Framework solution requires the following steps:
- Office Azure & SharePoint ALM - Build Pipeline
- Azure file copy (Task Version 2)
- "Display name"-> AzureBlobFileCopy
- "Source"-> $(System.DefaultWorkingDirectory)/_AzureDevOpsCI/CDN
- "AzureConnectionType"-> Azure Resource Manager
- "Azure Subscription"
- "Destination Type"-> Azure Blob
- "RM Storage Account"- >
- "Container Name"->
- SharePoint ALM: Catalog Scoped Actions
- "Display name"->SharePoint ALM: Add Solution Package
- "Connection to SharePoint" -> commsite01
- "Action"-> Add Solution Package
- "Path to SharePoint Solution Package"-> $(System.DefaultWorkingDirectory)/_AzureDevOpsCI/App/devops-01.sppkg
- "
- "PackageId output variable"-> AppPackageId
- SharePoint ALM: Catalog Scoped Actions
- "Display name"->SharePoint ALM: Deploy Solution Package
- "Connection to SharePoint" -> commsite01
- "Action"-> Deploy Solution Package
- "Id of the package in the SharePoint App Catalog" -> $(AppPackageId)
End to End implementation SPFx deployment using Azure DevOps with SharePoint (Application Life Cycle Management) & Blob Storage for Static files.
Thanks for sharing, exactly what i was looking.. you saved my day. Thank you so much
ReplyDeleteThanks you like it.
Deletemicrosoft office 365/ premium Office subscription for all your devices with exclusive monthly upgrades and new features of Word, Excel, PowerPoint, Onenote, Outlook, Publisher, Access, Supports 1 User / 5 PCs/Macs, 5 Tablets, 5 Phones Devices. Collaborate on documents with others online.
ReplyDelete